Hello there! π
This is my second post on dev.to regarding my API, I want to continue posting updates about FooApi here. You can read my first post to know more about the project and their features Introducing FooApi. FooApi is a personal project that aims to provide test data and different ways to manipulate it, all in one place, quickly and easily. That is why here you can find generic data, geographic data, images and methods like REST and GraphQL.
The platform provides realistic dummy data across several categories:
- Users π
- Products π
- Posts π
- Comments βοΈ
- To-dos βοΈ
- Images πΌοΈ
- Movies π½οΈ
- Songs π΅
- Cities π (GeoJSON)
- Countries πΊοΈ (GeoJSON geometries)
New Collection
Countries (GeoJSON geometries) πΊοΈ
Now you can retrieve country geometries through the /api/countries endpoints. All of them follow the GeoJSON format convention. In the documentation, youβll find the list of available endpoints and examples at /docs/countries
Also I've include POST, PUT, PATCH and DELETE endpoints for the Cities data collection. Remember You are free to explore and use these endpoints to mock your Geo Apps.
Custom Mock π½
You can now create a custom mock endpoint! fooapi.com/docs/mock Hereβs how it works:
You define the request method, status code, and response body, and FooApi will create an endpoint and a customID like fooapi.com/custom/abcd1234, then you can make your request and test your custom response.
- This endpoint expires after 1 hour, so youβll need to create a new one afterward.
- In the meantime, you can edit the last one by simply updating the values in the UI and clicking Update Endpoint.
This is an initial approach, so feel free to share suggestions in the comments to make it even better!
Example:
Testing in browser:
Buy me a coffee!
I've created an account in buymeacoffee.com, if you want to support this project you can do it here: buymeacoffee.com/carban donations will be used to maintain and improve the project.
Recognition
I just want to hightlight that FooApi was featured in the weeklyfoo.com newsletter #66 by @urbanisierung . You can find there great tools like mine, along with articles, news, tutorials, and video recommendations.
Top comments (0)