In order to have a dictionary of words to pull from for the Wordle game, we need to connect to an API that provides us with 5-letter dictionary words.
We will be using the Random Words API to first give us a repository of all dictionary words. From here, we will specify that we want to pull only 5-letter words for our game. In the past we have been able to do this by specifying it in the URL (like an example project we have done with NASA Images API), but we are still working through figuring out this aspect of the API.
As we start to build our API spec documentation in our repository, we will be adding fields to the JSON file to specify details about this API that we are using. As of right now, we are building out the information field and paths field.
The information field in the specifications document requires fields for the title of the API and the version. Other fields such as license, contract, and terms of service are optional but valuable fields to identify.
The paths field defines the relative paths to the API endpoint. These paths are appended to the end of the URL to help build out the entire, expanded URL.
Our start of the document can be found in the GitHub repository called "openapi.json".
You can find more info about the spec doc fields here
Top comments (0)