vkay94 / tmdb-kotlin Goto Github PK
View Code? Open in Web Editor NEWTheMovieDatabase API wrapper for Kotlin
Home Page: https://vkay94.github.io/TMDb-Kotlin
License: Apache License 2.0
TheMovieDatabase API wrapper for Kotlin
Home Page: https://vkay94.github.io/TMDb-Kotlin
License: Apache License 2.0
TMDB API: release_dates
Sample Request: https://api.themoviedb.org/3/movie/240/release_dates
{
"iso_3166_1": "PT",
"release_dates": [
{
"certification": "M/16",
"iso_639_1": "en",
"release_date": "1977-10-14T00:00:00.000Z",
"type": 3
}
]
}
As shown in the example response, note
field is not always present in the JSON Object.
Hi,
This is more of a question. I'm trying to understand the process of providing a different instance of OkHttpClient
without interfering with library's functionality.
As stated in documentation, it is possible to add certain modifications to TMDbInterceptor
and then assign the new Interceptor to TMDb.tmdbInterceptor
before calling init
. However it seems that TMDb.tmdbInterceptor
is immediately overwritten in defaultOkHttpClient()
function:
TMDb-Kotlin/src/main/java/de/vkay/api/tmdb/TMDb.kt
Lines 159 to 162 in 5feaa37
Furthermore, if we provide our own instance of OkHttpClient
, no TMDbInterceptor
is attached to it, unless we add it to OkHttpClient
ourselves and also set the TMDb.tmdbInterceptor
, as it seems that it only gets instantiated in defaultOkHttpClient()
function, and several functionalities of the library depend on TMDb.tmdbInterceptor
not being null.
I'm not sure about all these and it would be great if you could shed some light on this matter.
If I'm right though, it seems that if the defaultOkHttpClient()
get called anyway, regardless of user providing OkHttpClient or not, could be the solution. Of course it needs to instantiate a new OkHttpClient
if user has not provided one, and then modify it (add Interceptor) and also instantiate the TMDb.tmdbInterceptor
.
Method: TvService.aggregateCrew()
Response: UnknownError(error=com.squareup.moshi.JsonDataException: Expected END_OBJECT but was NAME at path $.crew[0].jobs[0].credit_id, code=null, headers=null)
It seems that this is related to parsing jobs
object which is present only in /tv/{tv_id}/aggregate_credits
endpoint, as it happens in every TV Show with crew
array not being empty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.