Skip to content

Commit f504ae7

Browse files
Rename swapi.dev to swapi.tech (#1709)
* Rename swapi.dev to swapi.tech Resolves: #1685 See: https://github.com/semperry/swapi?tab=readme-ov-file * swapi.tech has a different JSON structure
1 parent 560440a commit f504ae7

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

apps/repl/public/samples/remote-data.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ import { on } from '@ember/modifier';
1515
1616
import { RemoteData } from 'reactiveweb/remote-data';
1717
18-
const urlFor = (id) => `https://swapi.dev/api/people/${id}`;
18+
const urlFor = (id) => `https://swapi.tech/api/people/${id}`;
1919
2020
const Person = <template>
2121
{{#let (RemoteData (urlFor @id)) as |request|}}
2222
{{#if request.isLoading}}
2323
... loading {{@id}} ...
2424
{{else if request.value}}
25-
{{request.value.name}}
25+
{{request.value.result.properties.name}}
2626
{{/if}}
2727
{{/let}}
2828
</template>
@@ -56,4 +56,4 @@ Information about how Resources fit in to the next edition of Ember can be [foun
5656
[mdn-AbortController]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController
5757
[docs-remote-data]: https://ember-resources.pages.dev/modules/util_remote_data
5858
[polaris-reactivity]: https://wycats.github.io/polaris-sketchwork/reactivity.html
59-
[swapi]: https://swapi.dev/
59+
[swapi]: https://swapi.tech/

apps/tutorial/public/docs/11-requesting-data/1-using-remote-data/answer.gjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { on } from '@ember/modifier';
44

55
import { RemoteData } from 'reactiveweb/remote-data';
66

7-
const urlFor = (id) => `https://swapi.dev/api/people/${id}`;
7+
const urlFor = (id) => `https://swapi.tech/api/people/${id}`;
88

99
const Person = <template>
1010
{{#let (RemoteData (urlFor @id)) as |request|}}
1111
{{#if request.isLoading}}
1212
... loading {{@id}} ...
1313
{{else if request.value}}
14-
{{request.value.name}}
14+
{{request.value.result.properties.name}}
1515
{{/if}}
1616
{{/let}}
1717
</template>

apps/tutorial/public/docs/11-requesting-data/1-using-remote-data/prompt.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { on } from '@ember/modifier';
44

55
import { RemoteData } from 'reactiveweb/remote-data';
66

7-
const urlFor = (id) => `https://swapi.dev/api/people/${id}`;
7+
const urlFor = (id) => `https://swapi.tech/api/people/${id}`;
88

99
const Person = <template>
1010
{{! Use remote data here }}

apps/tutorial/public/docs/11-requesting-data/1-using-remote-data/prose.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ Information about how Resources fit in to the next edition of Ember can be [foun
4040
[mdn-AbortController]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController
4141
[docs-remote-data]: https://ember-resources.pages.dev/modules/util_remote_data
4242
[polaris-reactivity]: https://wycats.github.io/polaris-sketchwork/reactivity.html
43-
[swapi]: https://swapi.dev/
43+
[swapi]: https://swapi.tech/

apps/tutorial/public/docs/12-loading-patterns/1-keeping-latest/answer.gjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import { RemoteData, remoteData } from 'reactiveweb/remote-data';
77
import { keepLatest } from 'reactiveweb/keep-latest';
88

99
const isEmpty = (x) => !x || x?.length === 0;
10-
const urlFor = (id) => `https://swapi.dev/api/people/${id}`;
10+
const urlFor = (id) => `https://swapi.tech/api/people/${id}`;
1111

1212
const PersonInfo = <template>
1313
<fieldset class="border px-4">
1414
<legend>{{@person.url}}</legend>
15-
<pre><code>{{JSON.stringify @person null "\t"}}</code></pre>
15+
<pre><code>{{JSON.stringify @person null " "}}</code></pre>
1616
</fieldset>
1717
</template>;
1818

apps/tutorial/public/docs/12-loading-patterns/1-keeping-latest/prompt.gjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import { RemoteData, remoteData } from 'reactiveweb/remote-data';
77
import { keepLatest } from 'reactiveweb/keep-latest';
88

99
const isEmpty = (x) => !x || x?.length === 0;
10-
const urlFor = (id) => `https://swapi.dev/api/people/${id}`;
10+
const urlFor = (id) => `https://swapi.tech/api/people/${id}`;
1111

1212
const PersonInfo = <template>
1313
<fieldset class="border px-4">
1414
<legend>{{@person.url}}</legend>
15-
<pre><code class="language-json">{{JSON.stringify @person null "\t"}}</code></pre>
15+
<pre><code class="language-json">{{JSON.stringify @person null " "}}</code></pre>
1616
</fieldset>
1717
</template>;
1818

apps/tutorial/public/docs/4-logic/5-each-blocks/answer.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let planets = [
88
<ul>
99
{{#each planets as |planet|}}
1010
<li>
11-
<a href="https://swapi.dev/api/planets/{{planet.id}}/" target="_blank" rel="noopener noreferrer">
11+
<a href="https://swapi.tech/api/planets/{{planet.id}}/" target="_blank" rel="noopener noreferrer">
1212
{{planet.name}}
1313
</a>
1414
</li>

apps/tutorial/public/docs/4-logic/5-each-blocks/prompt.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let planets = [
88
<ul>
99
{{! open each block }}
1010
<li>
11-
<a href="https://swapi.dev/api/planets/{{planet.id}}/" target="_blank" rel="noopener noreferrer">
11+
<a href="https://swapi.tech/api/planets/{{planet.id}}/" target="_blank" rel="noopener noreferrer">
1212
{{planet.name}}
1313
</a>
1414
</li>

apps/tutorial/public/docs/4-logic/5-each-blocks/prose.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Looping over lists of data can be done with an `each` block:
44
<ul>
55
{{#each planets as |planet|}}
66
<li>
7-
<a href='https://swapi.dev/api/planets/{{planet.id}}/' target='_blank'>
7+
<a href='https://swapi.tech/api/planets/{{planet.id}}/' target='_blank'>
88
{{planet.name}}
99
</a>
1010
</li>
@@ -18,7 +18,7 @@ You can get the current index as a second argument as well:
1818
<ul>
1919
{{#each planets as |planet i|}}
2020
<li>
21-
<a href='https://swapi.dev/api/planets/{{planet.id}}/' target='_blank'>
21+
<a href='https://swapi.tech/api/planets/{{planet.id}}/' target='_blank'>
2222
{{i}}
2323
{{planet.name}}
2424
</a>

0 commit comments

Comments
 (0)