Skip to content

Commit

Permalink
build: rename to @mogeko/tmdb-request
Browse files Browse the repository at this point in the history
  • Loading branch information
mogeko committed Jul 3, 2023
1 parent 01c0da6 commit 8a7c476
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-seals-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@mogeko/tmdb-request": patch
---

Rename `tmdb-request` to `@mogeko/tmdb-request`
2 changes: 1 addition & 1 deletion apps/web/app/movie/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { request } from "tmdb-request";
import { request } from "@mogeko/tmdb-request";

import { tokens } from "@/config/tokens";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/search/[type]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from "next/link";
import { request } from "tmdb-request";
import { request } from "@mogeko/tmdb-request";

import { tokens } from "@/config/tokens";
import type { XOR } from "@/lib/utils";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"dependencies": {
"@hookform/resolvers": "^3.1.1",
"@mogeko/tmdb-request": "workspace:^",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-avatar": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.4",
Expand All @@ -31,7 +32,6 @@
"react-hook-form": "^7.45.1",
"react-icons": "^4.10.1",
"tailwind-merge": "^1.13.2",
"tmdb-request": "workspace:^",
"zod": "^3.21.4"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tmdb-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"release": "pnpm publish --access public"
},
"dependencies": {
"tmdb-request": "workspace:^"
"@mogeko/tmdb-request": "workspace:^"
},
"devDependencies": {
"@types/node": "20.2.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/tmdb-api/src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ENDPOINTS } from "@/endpoints";
import type { Recur, RestInterface } from "@/types";
import { parser, request, type Options } from "tmdb-request";
import { mergeDeep } from "tmdb-request/merge-deep";
import { parser, request, type Options } from "@mogeko/tmdb-request";
import { mergeDeep } from "@mogeko/tmdb-request/merge-deep";

export class TMDB {
private _defaultOpts: Options;
Expand Down
10 changes: 5 additions & 5 deletions packages/tmdb-request/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It use [RFC 6570 URI Template specification](https://www.rfc-editor.org/rfc/rfc6
By install with [npm](https://www.npmjs.com/package/npm), [yarn](https://yarnpkg.com), [pnpm](https://pnpm.io) or any other package manager that you use.

```shell
pnpm add tmdb-request
pnpm add @mogeko/tmdb-request
```

> **Note**
Expand All @@ -31,7 +31,7 @@ This library 1:1 mapping of REST API endpoints in the [The Movie Database API Re
For example, to get the details of a movie, you would do:

```js
import { request } from "tmdb-request";
import { request } from "@mogeko/tmdb-request";

// The default method is GET, so you can omit it.
const result = request("/movie/{movie_id}?language={lang}", {
Expand All @@ -52,7 +52,7 @@ You can also use `POST` request to interact with TMDB Server.
For example, to rate a movie, you would do:

```js
import { request } from "tmdb-request";
import { request } from "@mogeko/tmdb-request";

const result = request("POST /movie/{movie_id}/rating", {
headers: {
Expand All @@ -73,7 +73,7 @@ If you prefer to use other HTTP client, like [axios](https://axios-http.com).
You can use `parser` function to only parse the URL.

```js
import { parser } from "tmdb-request";
import { parser } from "@mogeko/tmdb-request";

parser("GET /movie/{movie_id}?language={lang}", {
headers: {
Expand Down Expand Up @@ -110,7 +110,7 @@ In this case, we will use the `endpoint.url` as the `route` parameter, so the `u
This feature is implemented by TypeScript's [function overloading](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads).

```js
import { parser, request } from "tmdb-request";
import { parser, request } from "@mogeko/tmdb-request";

// For request function
request({
Expand Down
2 changes: 1 addition & 1 deletion packages/tmdb-request/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "tmdb-request",
"name": "@mogeko/tmdb-request",
"version": "1.2.3",
"private": false,
"type": "module",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8a7c476

Please sign in to comment.