Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cairnswm/gpro-api
https://github.com/cairnswm/gpro-api
Last synced: about 19 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/cairnswm/gpro-api
- Owner: cairnswm
- Created: 2024-07-06T18:38:40.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T09:10:51.000Z (7 months ago)
- Last Synced: 2024-07-08T20:27:10.200Z (7 months ago)
- Language: PHP
- Size: 344 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gpro-api Generator
This repository contains 3 things
1. The Generator that recreates the php files for a pass though api as weel as a php file for each end point that contains a function for each API that can be used inside other PHP code
2. The generated APIs
3. the Generated Functions## Regenerate APIs and Functions
Stpes to regrenerate the api files
1. Convert the Grpo API spec to json (use an online tool: https://onlineyamltools.com/convert-yaml-to-json)
2. Run the generate.php script - this can be done by accessing the file through an apache server - e.g. XAMPP
The script once complete will place the api files into the ./api folder
### How to call an api
Use a tool such as postman. paste the URL of the file, for eaxmple
http://localhost/gpro-api/api/Menu.phpset the Auth token to bearer and paste your GPRO api key
Press send
# CreditsChatGPT for helping to generate the generator