If you are here, it means you are ready to play with thousands of mocked data on your next project. Good to go. It is been developed for aspirants like you.
So, as of now we have 3 different sets of data in 3 different directories.
- Movie data
- Stock market data
- Personal information data
All the data is contained in this URL
https://mock-apis-balaji.herokuapp.com/api
With respect to you required data, the next directories are routed.
For movies data: Go to
For people's personal information data: Go to
For stock market data: Go to
While hitting those URLs remember that, you'll be dumped with 1000s of data. Use query filters to fetch only the required data and only when needed. Because there is no use in dumping all the data at once and processing it. It makes your application a lot heavier. Fetch whenever needed.
No limitations in fetching.
No downtime.
Here is an example of a query filter:
Or you could fetch data by its index too. Each data has its own unique index from 0 to 999.
This will fetch you the 13th data in the data-set from the database.
Now is the time to describe the fields in each kind of datasets.
Each data-set consists of few fields, knowing those could be useful for filtering out the data in query parameter.
--------------------
Movie Data-set
_id: Unique id to individual data.
Integer value from 0 to 999.
movie_name: Name of the movie.
Case sensitive movie names
movie_genre: Genre of the movie.
Case sensitive genres like Action, Crime, Thriller, or any mix of all genres like Action|Crime|Thriller
gross: Gross collection of the movie.
$ currencied value in String(Ex: "$7625879.23")
--------------------
Personal Information data-set
Personal Information data-set
_id: Unique id to individual data
Integer value from 0 to 999
first_name: First name of the person
Case sensitive String
last_name: Last name of the person
Case sensitive String
email: Email of the person
Case sensitive String
gender: Gender of the person
Case sensitive String values (Male/Female)
City: City of the person
Case sensitive String value.
--------------------
Stock-Market Information data-set
--------------------
Stock-Market Information data-set
_id: Unique id to individual data
Integer value from 0 to 999
stock_symbol: Symbol of the instrument
Case sensitive String
stock_name: Name of the instrument
Case sensitive String
stock_industry: Industry of the instrument
Case sensitive String (Includes null values as n/a)
stock_sector: Sector to which the instrument belongs
Case sensitive String(Includes null values as n/a)
stock_capital: The total value of the stock
$ currencied value in String(Ex: "$123.2M")
stock_exchange: The stock exchange in which the stock is traded.
--------------------
A JavaScript way of fetching the dataset
fetch('https://mock-apis-balaji.herokuapp.com/api/personalinfo?gender=Male&city=Wuxiang')
.then((data) => data.json())
.then((data) => {
// Your function goes here
});
Please, let me know if I had missed anything, that makes you confused.
Feel free to suggest any data-set which is required by
you. There is still lots of space available in the data-base. Together we can fill it.
Photo by Damien TUPINIER on Unsplash
|
-Balaji. S.V
Happy fetching!
Comments
Post a Comment