Skip to content

Commit

Permalink
Update v1.3.0 (#17)
Browse files Browse the repository at this point in the history
Features

- Add `spring-requirements` script
- Add `Advanced filtering` to examples
- Add new rate limits
- Add example to API's
- Add `data_count` to overview
- Add name and status to SDK's table

Changes

- Update examples
- Remove docs about cache invalidation

*Bump version to 1.3.0*
*Upgrade to yarn 4.X*
  • Loading branch information
LucJosin committed Nov 1, 2023
1 parent 75677f2 commit 4bfd36b
Show file tree
Hide file tree
Showing 20 changed files with 374 additions and 40 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Yarn
node_modules/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Build files

Expand Down
48 changes: 48 additions & 0 deletions API/Actors.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,51 @@ Returns a json with the following stucture:
| gender | `?gender=0` | EQUALS |
| nationality | `?nationality=American` | EQUALS |
| character | `?character=*<uuid>` | LIKE |

## Example

> [!badge variant="primary" text="GET"] /api/{{api_version}}/actors/random
```json
{
"uuid": "ffa1c1a1-7242-4967-a295-ace92d2bd32f",
"href": "/api/v1/actors/ffa1c1a1-7242-4967-a295-ace92d2bd32f",
"sources": [
"https://www.netflix.com/tudum/stranger-things/cast",
"https://en.wikipedia.org/wiki/David_Harbour"
],
"thumbnail": "https://s6.imgcdn.dev/xeo5T.png",
"gender": 1,
"nationality": "American",
"seasons": [
"/api/v1/seasons/3b980ad3-aef8-4663-a7a9-64cb4979500a",
"/api/v1/seasons/1ff70278-fe7c-4619-9e37-91820eaa37b9",
"/api/v1/seasons/b956e444-8489-4bf9-9dd0-fb6b7683638a",
"/api/v1/seasons/4bae1f7c-04ff-40d7-a161-83d8608fbe1c"
],
"character": "/api/v1/characters/48bde91d-aa72-465d-ba6d-f8625009561d",
"socials": [
{
"social": "Instagram",
"handle": "@dkharbour",
"url": "https://www.instagram.com/dkharbour/"
},
{
"social": "Twitter",
"handle": "@DavidKHarbour",
"url": "https://www.twitter.com/DavidKHarbour"
}
],
"images": [
"https://cdn.britannica.com/53/244253-050-579D9771/Actor-David-Harbour-2022.jpg",
"https://m.media-amazon.com/images/M/MV5BZTc5ODUzMDAtZGFhZS00NmExLTlhYWYtZDY0NGI2MGMwYTIzXkEyXkFqcGdeQXVyODY0MzQyODc@._V1_.jpg",
"https://static.wikia.nocookie.net/marvelcinematicuniverse/images/7/7b/David_Harbour.jpg",
"https://media.gq-magazine.co.uk/photos/62c2aac01e96714691fd64ed/master/w_1600%2Cc_limit/July%252004%2520-%2520David%2520Harbour_Online5.jpg"
],
"created_at": "2023-07-27T11:48:58.78",
"updated_at": "2023-07-27T11:48:58.78",
"first_name": "David",
"last_name": "Harbour",
"birth_date": "1975-04-10"
}
```
26 changes: 26 additions & 0 deletions API/Characters.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,29 @@ See [Filters](../Guides/Filters.md)
| death_date | `?death_date=2000-12-01` | EQUALS |
| gender | `?gender=0` | EQUALS |
| actor | `?actor=*<uuid>` | LIKE |

## Example

> [!badge variant="primary" text="GET"] /api/{{api_version}}/characters/random
```json
{
"uuid": "ef69d278-76be-478e-a087-c81071cb83c3",
"href": "/api/v1/characters/ef69d278-76be-478e-a087-c81071cb83c3",
"sources": ["https://strangerthings.fandom.com/wiki/Mike_Wheeler"],
"thumbnail": "https://s6.imgcdn.dev/xm7Sq.jpg",
"gender": 1,
"actor": "/api/v1/actorss/52b8e340-aa3b-4899-af56-4bd727512cbd",
"images": [
"https://static.wikia.nocookie.net/strangerthings8338/images/1/19/Mike_S02E09.jpg",
"https://upload.wikimedia.org/wikipedia/pt/e/e7/Mike-Wheeler-S3.jpg",
"https://rollingstone.uol.com.br/media/uploads/2023/02/stranger-things-mike-morre-5-temporada-foto-reproducao-netflix.jpg",
"https://hips.hearstapps.com/hmg-prod/images/stranger-things-finn-wolfhard-1654185204.jpg"
],
"created_at": "2023-08-11T19:27:25.287548",
"updated_at": "2023-08-11T19:27:25.287548",
"first_name": "Mike",
"last_name": "Wheeler",
"birth_date": "1971-04-07"
}
```
23 changes: 23 additions & 0 deletions API/Episodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,26 @@ See [Filters](../Guides/Filters.md)
| next_episode | `?next_episode=*<uuid>` | LIKE |
| prev_epsisode | `?prev_epsisode=*<uuid>` | LIKE |
| season | `?season=*<uuid>` | LIKE |

## Example

> [!badge variant="primary" text="GET"] /api/{{api_version}}/episodes/random
```json
{
"uuid": "a07af8a9-0873-4f6c-9cfa-8eafc8705fb2",
"href": "/api/v1/episodes/a07af8a9-0873-4f6c-9cfa-8eafc8705fb2",
"sources": ["https://www.netflix.com/title/80057281"],
"thumbnail": "https://s6.imgcdn.dev/xWXri.jpg",
"title": "The Bite",
"description": "With time running out -- and an assassin close behind -- Hopper's crew races back to Hawkins, where El and the kids are preparing for war.",
"language": "en-US",
"duration": 3360000,
"season": "/api/v1/seasons/b956e444-8489-4bf9-9dd0-fb6b7683638a",
"created_at": "2023-07-24T12:33:55.767",
"updated_at": "2023-07-24T12:33:55.767",
"episode_num": 7,
"next_episode": "/api/v1/episodes/a4ed46c8-47b7-40fc-b1d9-cacc629e93da",
"prev_episode": "/api/v1/episodes/a07af8a9-0873-4f6c-9cfa-8eafc8705fb2"
}
```
50 changes: 50 additions & 0 deletions API/Games.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,53 @@ See [Filters](../Guides/Filters.md)
| release_date | `?release_date=2001-01-01` | EQUALS |
| playtime | `?playtime=>18000000` | GREATER_THAN |
| age_rating | `?age_rating=16+` | EQUALS |

## Example

> [!badge variant="primary" text="GET"] /api/{{api_version}}/games/random
```json
{
"uuid": "00c0d5d4-4ba6-4f63-9062-8c1c4cb37f88",
"href": "/api/v1/games/00c0d5d4-4ba6-4f63-9062-8c1c4cb37f88",
"sources": [
"https://www.igdb.com/games/stranger-things-the-game",
"https://rawg.io/games/stranger-things-the-game"
],
"thumbnail": "https://s6.imgcdn.dev/x3vyN.jpg",
"name": "Stranger Things: The Game",
"description": "Join Hopper and the kids for bruising missions around Hawkins - and the Upside Down - in this stylized retro adventure filled with collectibles. It's 1984 all over again. Experience an action adventure game just like the ones our heroes would have played back in the day. Explore Hawkins and its surroundings. See your favorite locations like Mirkwood Forest and Hawkins Lab. Uncover exciting areas you've never seen before! Solve puzzles with the unique abilities of each character. Lucas can nail anything with his Wrist Rocket. Nancy has an entire collection of bats to swing this time. Collect all the Eggos and gnomes you can lay your hands on. You never know what they might unlock.",
"language": "en-US",
"platforms": ["Android", "iOS"],
"stores": [
"https://play.google.com/store/apps/details?id=com.netflix.NGP.StrangerThings",
"https://apps.apple.com/us/app/stranger-things-1984/id1574739824"
],
"modes": ["Single Player"],
"genres": ["Adventure", "Role-Playing (RPG)"],
"publishers": ["BonusXP", "Netflix"],
"developers": ["BonusXP"],
"website": "https://bonusxp.com/games/stranger-things-the-game/",
"tags": [
"Pixel Graphics",
"Retro",
"Dungeons",
"RPG-Adventure",
"Sci-Fi",
"Side-Quests"
],
"trailer": "https://www.youtube.com/watch?v=OthEKbkPftk",
"images": [
"https://cdn.mobilesyrup.com/wp-content/uploads/2017/10/stranger-things-the-game-3.jpg",
"https://cdn.mobilesyrup.com/wp-content/uploads/2017/10/stranger-things-the-game-2.jpg",
"https://cdn.mobilesyrup.com/wp-content/uploads/2017/10/stranger-things-the-game-1.jpg",
"https://assets1.ignimgs.com/2019/03/20/stranger-things-3-game---button-fin-1553102079523.jpg",
"https://oceanofgamer.com/wp-content/uploads/2019/07/Stranger-Things-3-The-Game-Free-Download-1.jpg",
"https://oceanofgamer.com/wp-content/uploads/2019/07/Stranger-Things-3-The-Game-Free-Download-2.jpg"
],
"created_at": "2023-07-25T20:34:31.68",
"updated_at": "2023-07-25T20:34:31.68",
"age_rating": "16+",
"release_date": "2017-10-04"
}
```
25 changes: 25 additions & 0 deletions API/Locations.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,28 @@ See [Filters](../Guides/Filters.md)
| :---------- | :------------------- | :----------: |
| name | `?name=Lorem` | EQUALS |
| description | `?description=Lorem` | EQUALS |

## Example

> [!badge variant="primary" text="GET"] /api/{{api_version}}/locations/random
```json
{
"uuid": "f374c7fd-4468-458d-a219-cf71c7a1254a",
"href": "/api/v1/locations/f374c7fd-4468-458d-a219-cf71c7a1254a",
"sources": [
"https://strangerthings.fandom.com/wiki/Mayfield_trailer",
"https://strangerthings.fandom.com/wiki/Category:Locations"
],
"thumbnail": "https://s6.imgcdn.dev/xb20L.jpg",
"name": "Mayfield trailer",
"description": "The Mayfield trailer is a trailer home that Max Mayfield and her mother lived in after Max's stepfather.",
"language": "en-US",
"images": [
"https://oddstops.com/i/2022/07/15/20220715084940-max-trailer.webp",
"https://oddstops.com/i/2022/07/15/p-202207150836-trailer-park-stranger-thing.webp"
],
"created_at": "2023-07-26T22:26:11.324",
"updated_at": "2023-07-26T22:26:11.324"
}
```
68 changes: 55 additions & 13 deletions API/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,58 @@ You can use the [Try it (Overview)]({{url}}/try-it/#/overview) section to test e

Returns a json with the following stucture:

| Field | Data Type |
| :---------- | :------------- |
| uuid | UUID |
| href | String |
| title | String |
| description | String |
| language | String |
| languages | List\<String\> |
| creators | List\<String\> |
| thumbnail | String |
| sources | List\<String\> |
| created_at | Date |
| updated_at | Date |
| Field | Data Type |
| :---------- | :---------------------- |
| uuid | UUID |
| href | String |
| title | String |
| description | String |
| language | String |
| languages | List\<String\> |
| creators | List\<String\> |
| thumbnail | String |
| sources | List\<String\> |
| data_count | [DataCount](#datacount) |
| created_at | Date |
| updated_at | Date |

### DataCount

| Field | Data Type |
| :---------- | :-------- |
| actors | Int |
| characters | Int |
| episodes | Int |
| games | Int |
| locations | Int |
| seasons | Int |
| soundtracks | Int |

## Example

> [!badge variant="primary" text="GET"] /api/{{api_version}}/overview
```json
{
"uuid": "90edba4c-4399-4582-847c-833c597b03c1",
"href": "/api/v1/overview/90edba4c-4399-4582-847c-833c597b03c1",
"sources": ["https://www.netflix.com/title/80057281"],
"thumbnail": "https://s6.imgcdn.dev/2rdwu.jpg",
"title": "Stranger Things",
"description": "When a young boy vanishes, a small town uncovers a mystery involving secret experiments, terrifying supernatural forces and one strange little girl.",
"language": "en-US",
"languages": ["en-US", "pt-BR"],
"creators": ["Matt Duffer", "Ross Duffer"],
"data_count": {
"actors": "13",
"characters": "13",
"episodes": "34",
"games": "3",
"locations": "32",
"seasons": "4",
"soundtracks": "0"
},
"created_at": "2023-08-07T15:46:09.091",
"updated_at": "2023-08-07T15:46:09.091"
}
```
44 changes: 44 additions & 0 deletions API/Seasons.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,47 @@ See [Filters](../Guides/Filters.md)
| next_episode | `?next_episode=*<uuid>` | LIKE |
| prev_epsisode | `?prev_epsisode=*<uuid>` | LIKE |
| budget | `?budget=48000000` | EQUALS |

## Example

> [!badge variant="primary" text="GET"] /api/{{api_version}}/seasons/random
```json
{
"uuid": "4bae1f7c-04ff-40d7-a161-83d8608fbe1c",
"href": "/api/v1/seasons/4bae1f7c-04ff-40d7-a161-83d8608fbe1c",
"sources": [
"https://www.netflix.com/title/80057281",
"https://www.rottentomatoes.com/tv/stranger_things",
"https://in.ign.com/stranger-things/171687/news/season-4-of-stranger-things-reportedly-costed-30-million-per-episode"
],
"thumbnail": "https://s6.imgcdn.dev/xdU0w.jpg",
"title": "Stranger Things 4",
"description": "Darkness returns to Hawkins just in time for spring break, igniting fresh terror, disturbing memories — and an ominous new threat.",
"language": "en-US",
"genres": ["Drama", "Sci fi", "Horror", "Mystery thriller"],
"episodes": [
"/api/v1/episodes/88cd5665-bfb6-4176-9040-9194573eeac8",
"/api/v1/episodes/3fabbaa2-d763-4e0e-83b7-bea55b28adad",
"/api/v1/episodes/c19ae791-02b4-4861-85a8-94fbba1f24ba",
"/api/v1/episodes/7261b8fb-d478-4d71-8787-08767d44197e",
"/api/v1/episodes/07a4fe52-d9cb-476e-b981-a1a05f5ef81c",
"/api/v1/episodes/ffd88734-834a-4cb4-b620-4f9fe97aea31",
"/api/v1/episodes/6adf4b0e-134e-466d-9c62-763b339da1a4",
"/api/v1/episodes/922abde7-eff1-4cf5-b643-37ed1aad6be5",
"/api/v1/episodes/04984f61-7c04-4cec-8fc7-bc0786df8d4c"
],
"trailers": [
"https://www.youtube.com/watch?v=a3thyAnShck",
"https://www.youtube.com/watch?v=mVsJXiI60a0",
"https://www.youtube.com/watch?v=sBEvEcpnG7k"
],
"budget": 270000000,
"created_at": "2023-07-24T20:51:42.57",
"updated_at": "2023-07-24T20:51:42.571",
"duration_total": 46920000,
"season_num": 4,
"release_date": "2022-05-27",
"prev_season": "/api/v1/seasons/b956e444-8489-4bf9-9dd0-fb6b7683638a"
}
```
8 changes: 6 additions & 2 deletions Examples/Actor-By-Character.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ How to request actor from specific character

### Equals

> [!badge variant="primary" text="GET"] /api/{{api_version}}/actors?character=/api/v1/characters/ef69d278-76be-478e-a087-c81071cb83c3
> [!badge variant="primary" text="GET"] /api/{{api_version}}/actors?**character=/api/v1/characters/ef69d278-76be-478e-a087-c81071cb83c3**
### Like

> [!badge variant="primary" text="GET"] /api/{{api_version}}/actors?character=\*ef69d278-76be-478e-a087-c81071cb83c3
> [!badge variant="primary" text="GET"] /api/{{api_version}}/actors?**character=\*ef69d278-76be-478e-a087-c81071cb83c3**
See also:

[!ref icon="filter"](../Guides/Filters.md)
15 changes: 15 additions & 0 deletions Examples/Advanced-Filtering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
label: Advanced filtering
icon: square
order: 1
---

# Advanced filtering

How to request all characters with **last name `like` Wheeler**, **gender `equals to` 1** and **birth date `greater or equals to` 1967-01-01**

> [!badge variant="primary" text="GET"] /api/{{api_version}}/characters?**last_name=\*Wheeler&gender=1&birth_date=>=1967-01-01**
See also:

[!ref icon="filter"](../Guides/Filters.md)
8 changes: 6 additions & 2 deletions Examples/Episodes-By-Season.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ How to request all episodes from specific season

### Equals

[!badge variant="primary" text="GET"] /api/{{api_version}}/episodes?season=/api/v1/seasons/3b980ad3-aef8-4663-a7a9-64cb4979500a
> [!badge variant="primary" text="GET"] /api/{{api_version}}/episodes?**season=/api/v1/seasons/3b980ad3-aef8-4663-a7a9-64cb4979500a**
### Like

[!badge variant="primary" text="GET"] /api/{{api_version}}/episodes?season=\*3b980ad3-aef8-4663-a7a9-64cb4979500a
> [!badge variant="primary" text="GET"] /api/{{api_version}}/episodes?**season=\*3b980ad3-aef8-4663-a7a9-64cb4979500a**
See also:

[!ref icon="filter"](../Guides/Filters.md)
6 changes: 3 additions & 3 deletions Guides/Caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
icon: database
---

By default we cache the results of each request you make for **1 hour**. If you make the same request again, for example, we'll serve the cached result.
<!-- By default we cache the results of each request you make for **1 hour**. If you make the same request again, for example, we'll serve the cached result. -->

The cache is shared across all users. If two users run a query with the same requests—even with different auth tokens—the cached results are still returned.

- **Example¹**: If you request such as `/api/v1/episodes?duration=>3000000` and a second request with `/api/v1/episodes?duration=>3000000`, the API will define as **equals** and will _return the cached data_.
- **Example²**: If you request such as `/api/v1/episodes?episode_num=1` and a second request with `/api/v1/episodes?episode_num=2`, the API will define as **different** and will _create a cache for each one_.

!!!Note
<!-- !!!Note
The cache will be invalidated after **1 hour of inactivity**
!!!
!!! -->

You can identify if a result has been cached by checking the `ETag` header on the API response.

Expand Down
Loading

0 comments on commit 4bfd36b

Please sign in to comment.