Bookdata API
In Kaggle there is a dataset for bookdata. Its a csv file with about 13000 books. We will use it to make our own bookdata api.
You can look at the file ☝🏼 there.
Clone Repo
Let's get started.
In a separate folder
git clone https://github.com/moficodes/bookdata-api.gitTour of the Code
There are two packages inside the code. One is called datastore, one is called loader.
Loader deals with converting the csv data into an array of bookdata objects.
Datastore deals with how we access the data. It's mainly an interface that has some methods.
EndPoints
The App has a few Endpoints
Deploy app to cloud
This step is completely optional. But if you want to run you go app in the cloud somewhere IBM Cloud has an excellent paas solution using Cloud Foundry.
If you want to follow along
Install IBM Cloud CLI
Once you have an IBM Cloud account and the IBM Cloud CLI installed,
From terminal
Open the manifest.yaml in the root of the cloned repository.
Change the app name to something you like. After the change the file should look something like this
Then from the root of the repo run
Wait a few minutes and voila! It should be running.
To find your app url
You should see your app as running and also have the URL there.
From that url you can test out all the endpoints still work.
Last updated
Was this helpful?