-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
168593a
commit 46d4014
Showing
58 changed files
with
493 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "next/typescript"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/versions | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# env files (can opt-in for commiting if needed) | ||
.env* | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
This is a [Next.js](https://nextjs.org) app | ||
demonstrating how to use | ||
Streaming Availability React Components. | ||
|
||
## Getting Started | ||
|
||
First, you need an API key to use the Streaming Availability React Components. | ||
It's free to get it without any credit card information. | ||
To get one, please follow the instructions in the | ||
[Authorization Guide](https://docs.movieofthenight.com/guide/authorization). | ||
|
||
Once you have an API key, | ||
create a `.env` file in the root of the project | ||
and add your API key as follows | ||
(replace `<your-api-key>` with your actual API key): | ||
|
||
``` | ||
STREAMING_AVAILABILITY_API_KEY=<your-api-key> | ||
``` | ||
|
||
Install the dependencies: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
Then, you can run the development server: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
||
## Learn More | ||
|
||
To learn more about Streaming Availability API, take a look at the following resources: | ||
|
||
- [Streaming Availability API Documentation](https://docs.movieofthenight.com/) - learn about Streaming Availability API. | ||
- [Streaming Availability API Landing Page](https://nextjs.org/learn) - discover the features supported. | ||
|
||
You can check out [the Streaming Availability React Components repository](https://github.com/movieofthenight/react-streaming-availability) - your feedback and contributions are welcome! |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
body { | ||
color: #ededed; | ||
background: #0a0a0a; | ||
padding-bottom: 4rem; | ||
} | ||
|
||
h1 { | ||
font-size: 2rem; | ||
font-weight: bold; | ||
margin: 4rem; | ||
} | ||
|
||
h2 { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
margin: 1rem 4rem; | ||
} | ||
|
||
p { | ||
margin: 1rem 4rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import type { Metadata } from "next"; | ||
import "./globals.css"; | ||
import { Open_Sans } from 'next/font/google' | ||
|
||
export const metadata: Metadata = { | ||
title: "Streaming Availability React Components Demo", | ||
description: "Streaming Availability React Components Demo", | ||
}; | ||
|
||
const openSans = Open_Sans({ | ||
subsets: ['latin'], | ||
display: 'swap', | ||
}) | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return ( | ||
<html lang="en"> | ||
<body | ||
className={`${openSans.className} antialiased`} | ||
> | ||
{children} | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import {Grid, newChangesSource, newFilteredSearchSource, newTopShowsSource, Row} from "react-streaming-availability"; | ||
|
||
export default function Home() { | ||
return ( | ||
<main> | ||
<h1>Streaming Availability React Components Demo</h1> | ||
<p>Click on the posters or logos to follow the deep links into streaming service apps.</p> | ||
<Row | ||
title="Apple TV+ Germany Top Shows Row with Vertical Posters" | ||
posterType="horizontal" | ||
source={newTopShowsSource({ | ||
country: "de", | ||
service: "apple", | ||
})} /> | ||
<Row | ||
title="Netflix US Top 10 Series Row with Vertical Posters" | ||
posterType="vertical" | ||
source={newTopShowsSource({ | ||
country: "us", | ||
showType: "series", | ||
service: "netflix", | ||
})} /> | ||
<Row | ||
title="Expiring Movies & Series in US" | ||
posterType="horizontal" | ||
source={newChangesSource({ | ||
country: "us", | ||
changeType: "expiring", | ||
itemType: "show", | ||
})} /> | ||
<h2>Popular Movies & Series in US</h2> | ||
<Grid source={ | ||
newFilteredSearchSource({ | ||
country: "us", | ||
orderBy: "popularity_1month", | ||
orderDirection: "desc", | ||
limit: 100, | ||
}) | ||
} /> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { NextConfig } from "next"; | ||
|
||
const nextConfig: NextConfig = { | ||
/* config options here */ | ||
}; | ||
|
||
export default nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "react-streaming-availability-demo", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"react": "19.0.0-rc-02c0e824-20241028", | ||
"react-dom": "19.0.0-rc-02c0e824-20241028", | ||
"next": "15.0.2", | ||
"react-streaming-availability": "^0.1.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5", | ||
"@types/node": "^20", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.4.1", | ||
"eslint": "^8", | ||
"eslint-config-next": "15.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @type {import('postcss-load-config').Config} */ | ||
const config = { | ||
plugins: { | ||
tailwindcss: {}, | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Config } from "tailwindcss"; | ||
|
||
const config: Config = { | ||
content: [ | ||
"./pages/**/*.{js,ts,jsx,tsx,mdx}", | ||
"./components/**/*.{js,ts,jsx,tsx,mdx}", | ||
"./app/**/*.{js,ts,jsx,tsx,mdx}", | ||
], | ||
theme: { | ||
extend: { | ||
colors: { | ||
background: "var(--background)", | ||
foreground: "var(--foreground)", | ||
}, | ||
}, | ||
}, | ||
plugins: [], | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2017", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"incremental": true, | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"paths": { | ||
"@/*": ["./*"] | ||
} | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.