1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

docs: swapi.dev no longer exists (#8997)

Closes #8939
This commit is contained in:
Gastón Fournier 2024-12-18 17:55:09 +01:00 committed by GitHub
parent da16b316aa
commit cac47fc8f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,7 @@ import VideoContent from '@site/src/components/VideoContent.jsx';
Hello! In this tutorial well show you how to add feature flags to your Ruby app , using [Unleash](https://www.getunleash.io/) and the official [Unleash Ruby SDK](https://docs.getunleash.io/reference/sdks/ruby). With Unleash, an open-source feature flag service, you can use our tooling to add feature flags to your application and release new features faster. Hello! In this tutorial well show you how to add feature flags to your Ruby app , using [Unleash](https://www.getunleash.io/) and the official [Unleash Ruby SDK](https://docs.getunleash.io/reference/sdks/ruby). With Unleash, an open-source feature flag service, you can use our tooling to add feature flags to your application and release new features faster.
In a classic tutorial fashion, well get a list of planets from the [Star Wars API](https://swapi.dev/), with just Ruby (i.e., not Ruby on Rails). Well use feature flags to decide whether to call the REST or the GraphQL version of the API. In a classic tutorial fashion, well get a list of planets from the [Star Wars API](https://swapi.py4e.com), with just Ruby (i.e., not Ruby on Rails). Well use feature flags to decide whether to call the REST or the GraphQL version of the API.
- [Prerequisites](#prerequisites) - [Prerequisites](#prerequisites)
- [1. Best practices for back-end apps with Unleash](#1-best-practices-for-back-end-apps-with-unleash) - [1. Best practices for back-end apps with Unleash](#1-best-practices-for-back-end-apps-with-unleash)
@ -107,7 +107,7 @@ require 'json'
require 'unleash' require 'unleash'
# Call the REST API # Call the REST API
response = HTTPX.get('https://swapi.dev/api/planets/') response = HTTPX.get('https://swapi.py4e.com/api/planets/')
planets = JSON.parse(response.body)['results'].map do |planet| planets = JSON.parse(response.body)['results'].map do |planet|
{ name: planet['name'], population: planet['population'] } { name: planet['name'], population: planet['population'] }
end end
@ -157,7 +157,7 @@ if is_graphql
puts "Hello GraphQL" puts "Hello GraphQL"
else else
# Call the REST API # Call the REST API
response = HTTPX.get('https://swapi.dev/api/planets/') response = HTTPX.get('https://swapi.py4e.com/api/planets/')
planets = JSON.parse(response.body)['results'].map do |planet| planets = JSON.parse(response.body)['results'].map do |planet|
{ name: planet['name'], population: planet['population'] } { name: planet['name'], population: planet['population'] }
end end