Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: TMDbClient #180

Merged
merged 18 commits into from
May 22, 2024
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ jobs:
uses: actions/checkout@v4

- name: Build
run: swift build --build-tests -Xswiftc -warnings-as-errors
run: swift build --build-tests -Xswiftc -warnings-as-errors -Xswiftc -strict-concurrency=complete

- name: Test
run: swift test --skip-build --filter TMDbTests
run: swift test --skip-build --filter TMDbTests -Xswiftc -strict-concurrency=complete

- name: Build for Release
run: swift build -c release -Xswiftc -warnings-as-errors
run: swift build -c release -Xswiftc -warnings-as-errors -Xswiftc -strict-concurrency=complete
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ Add the TMDb package to your Project's Package dependencies.
Create an API key from The Movie Database web site
[https://www.themoviedb.org/documentation/api](https://www.themoviedb.org/documentation/api).

### Quick Start

```swift
let tmdbClient = TMDbClient(apiKey: "<your-tmdb-api-key>")

let moviesToDiscover = try await tmdbClient.discover.movies().results
let fightClub = try await tmdbClient.movies.details(forMovie: 550)
```

## Documentation

Documentation and examples of usage can be found at
Expand Down
2 changes: 1 addition & 1 deletion Sources/TMDb/Domain/APIClient/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import Foundation

protocol APIClient {
protocol APIClient: Sendable {

func perform<Request: APIRequest>(_ request: Request) async throws -> Request.Response

Expand Down
Loading
Loading