I'm learning the way to use API right now. Since I want to publish the code on GitHub, I have some question about it.
1. I will use public API, however, there are APIs with authorization and those don't (as listed here). I learned that publish an API call with API key will be a bad idea, however, for the APIs without key, it won't matter, right?
2. Let say if I make a call to Lorem Picsum (a free image API without API key) in my code, is it legal to push the codebase to GitHub public repository (without executable file)? Is it legal to make an executable file and put to release section? I cannot find any clear information about this, since they don't have Q&A section. However, as the Lorem Picsum project is under MIT license, and after reading this blog post by one of the author, I think it is legal to do so.
When I look at other APIs like Placeholder or Pexels, it seems like there is a restriction when putting the application to production server, or the application has a high amount of request to the API server, which make senses. The thing is, an application, or code snippet, I want to make are simply out-of-class/personal project that I make during spare times (I'm still a student). Certainly, it isn't the same as what commercial apps do; well, unless my repository somehow becomes popular and my application is downloaded 1 million times, then it will be a different story.
3. For the matter that I asked in question 2, can it be applied to all public API, or will it vary from one to another?
Thanks for the answers
- The question is more about conventional practice, so I don't include the detail about code or environment. It should be applied to all type of API call.
- Link to GitHub project (as suggested): https://github.com/hunghvu/dynamic-wallpaper