Comments (5)
For a basic API (which SWAPI is), providing the URL is sufficient.
However, in a more powerful and complicated structure, having access to the id is crucial. For example, you could expand the functionality of your planets service. Maybe it could take an array of character IDs and return a list of all the planets those characters have every visited.
The ability to compose IDs with services is crucial in modern API architecture. A model shouldn't have to provide a URL for every place that it can be used.
This clearly isn't crucial for SWAPI. But I often use SWAPI when teaching developers to consume APIs. Having SWAPI act a bit more like the average API would definitely be helpful.
from swapi.
I'm currently implementing an APL-Wrapper for SWAPI and was surprised by the same.
I see the point about HATEOAS, but I'm also with @jacob-israel-turner on that ;)
Guess I will create the IDs myself from the URL then and provide a health-warning...
from swapi.
Why isn't the url sufficient enough? You would have to construct the URL anyway with the ID param? It's actually more HATEOAS (http://phalt.co/what-is-hateoas/) to use full URLs and not IDs :)
from swapi.
hi @mbaas2 , have you created the IDs from the URL parameter? I will be so thankfull if you can give me a snippet from your code.
Thanks!
from swapi.
@luismigil Sure, no problem: it's here.
from swapi.
Related Issues (20)
- Search with names. HOT 2
- Add a midi-chlorian count for the Force users
- Height of R2-D2 HOT 3
- Limit results number per page
- Films id does not match url id HOT 1
- SwapiSwift framework
- Does not provide all star wars films HOT 1
- The API is down HOT 1
- The Website is Down HOT 1
- Forked my own verson of SWAPI HOT 7
- swapi.dev - running service HOT 21
- swapi.py4e.com asking for donations?
- SSL Cert
- Swapi
- No heading "https"
- website has gone down in last 12 hours.
- The Website is down again
- Certification expired HOT 3
- No image for api resources
- All schemas return 404 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swapi.