https://github.com/thisdot/movies-api
API of movie and genre data as a Node v GraphQL POC
https://github.com/thisdot/movies-api
Last synced: over 1 year ago
JSON representation
API of movie and genre data as a Node v GraphQL POC
- Host: GitHub
- URL: https://github.com/thisdot/movies-api
- Owner: thisdot
- Created: 2023-11-09T00:43:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T15:25:00.000Z (almost 2 years ago)
- Last Synced: 2025-01-22T07:19:11.931Z (over 1 year ago)
- Language: TypeScript
- Size: 669 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Movies API (GraphQL and REST)
## Overview
Welcome to the `movies-api` repository! This open-source project provides a comprehensive API (both GraphQL and RESTful) for accessing a wide range of movie data. Whether you're looking for a specific title or exploring different genres, our API makes it easy to access the information you need.
## Features
- **GraphQL & RESTful API**: Two ways to interact with our movie database.
- **Bearer Token Authorization**: Secure access to our API endpoints.
- **Extensive Movie Data**: Access a wide range of movie information.
## Getting Started
### Base URL
The base URL for our API is `https://0kadddxyh3.execute-api.us-east-1.amazonaws.com`. All endpoints are prefixed with this base URL.
### Obtaining an Access Token
To use our API, first, obtain a bearer token:
1. Send a `GET` request to `/auth/token`.
2. Use this token in the Authorization header of your subsequent API calls.
### Setting Up the GraphQL Sandbox
1. Open the GraphQL sandbox endpoint and click on the connection settings

2. Update the headers by adding the `Authorization` bearer token

## API Endpoints
Here's a list of our available API endpoints:
### RESTful Endpoints
- `GET /auth/token`: Fetch a valid token to be used in the queries below
- `GET /healthcheck`: Check status of the app
- `GET /genres/movies`: Fetch a list of all movie IDs grouped by genre
- Query Parameters:
- `page`: the page number to be fetched, starting at page 1 (default = 1)
- `limit`: the number of items per page (default = 25)
- `GET /movies`: Fetch a list of all movies
- Query Parameters:
- `page`: the page number to be fetched, starting at page 1 (default = 1)
- `limit`: the number of items per page (default = 25)
- `search`: searches for a movie title (simple string match in the whole title string)
- `genre`: searches for a movie genre (exact match)
- `GET /movies/{id}`: Fetch details of a specific movie
- `GET /movies/titles`: Fetch a list of all movie IDs and titles
- Query Parameters:
- `page`: the page number to be fetched, starting at page 1 (default = 1)
- `limit`: the number of items per page (default = 25)
- `GET /movies/genres/{id}`: Fetch stats details of a movie genre
### GraphQL Queries
GraphQL queries can be accessed using the endpoint `/graphql`. Open the sandbox at `/graphql` and take a look at the query schema documentation.

## License
This project is licensed under the MIT license.