ncubed / themoviedbwrapper Goto Github PK
View Code? Open in Web Editor NEWC# wrapper for common requests against themoviedb.org API.
License: MIT License
C# wrapper for common requests against themoviedb.org API.
License: MIT License
Will migrate away from the portable project library and into the newer VS 2019 netstandard project library.
When I run call your methods to get data it works fine locally . but when I host it doesnt work ..... my services provider say it due to Full trust level its there a way it can be Medium trust level?
After a couple of years of neglect, several of the integration tests are broken. Is anyone surprised? I'm not. Let's get this project running again.
There is a problem when the info for requested TV show Task<ApiQueryResponse<TVShow>> FindByIdAsync(int tvShowId, string language = "en");
returns a null value for a season air_date because the property AirDate in the class Season is not supposed to be null.
This is the case with a TV show called "Haven" with 33001 as TMDBId which has a record with a special season that has air_date: null
To replicate:
ApiQueryResponse<TVShow> responseInfo = await tvApi.FindByIdAsync(33001);
Error: Cannot convert null value to System.DateTime. Path 'seasons[0].air_date', line 1, position 1006.
This function:
public async Task<ApiQueryResponse> QueryAsync( string command, IDictionary<string, string> parameters, Func<string, T> deserializer )
{
using( HttpClient client = CreateClient() )
{
string cmd = CreateCommand( command, parameters );
...
creates a HttpClient each time the function is called.
Is that necessary? Would it not be more efficient to create an instance of the HttpClient in the constructor of ApiRequestBase?
I am trying to install this package with nuget into a Cross-Platform Blank Portable app,
It does install fine into the .Droid and .iOS but when I try to install with nuget into the PCL(Portable Library) project it always gives me the following error. Even if I change Targets so the .NETPortable goes up to v4.5=Profile259 it gives me the same Error.
Error Could not install package 'TheMovieDbWrapper 0.8.0'.
You are trying to install this package into a project that targets '.NETPortable,Version=v4.0,Profile=Profile24',
but the package does not contain any assembly references or content files
that are compatible with that framework. For more information, contact the package author.
@yeah-buddy - what are your thoughts on updating the TV namespace to Television? Or, is TV more appropriate for the API?
Title says it all.
The Movie DB supports the following API details:
As far as I can tell this is not supported in the IApiTVShowRequest interface?
The latest release on Nuget is too old and has a null ref bug which was resolved with #25 while fixing integration tests. Additionally, the packaging for nusepc files is built-in to VS 2019.
What kind of dark-side troll removes "jedi" from the keywords of a Star Wars movie?
When I try to install TheMovieDbWrapper into a Xamarin.iOS project, I get the following error:
Could not install package 'TheMovieDbWrapper 0.7.1'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
What is the problem here?
There does not seem a way to get the associated IMDB ID when using SearchByTitleAsync()?
When retrieving the movie "Avatar" (id= 19995), I received a JsonReaderException.
"Additional information: JSON integer 2781505847 is too large or small for an Int32. Path 'revenue', line 1, position 1122."
When porting to .netstandard (PCL support), the MovieDbFactory
required refactoring to accommodate the changes in MEF as currently supported in .netstandard. Specifically, MEF2 no longer supports attributes for describing imports/exports which IMovieDbApi
implementation heavily relied upon.
The current release no longer uses MEF. This issue is to continue the refactor of the MovieDbFactory
and introduction of an alternative IoC container.
Why did you implement DM.MovieApi namespace and not only MovieDb one?
Hi! I have tested your library for a while and I have not got the release version to work at all.
Check these error-series:
Error: 2018.04.17 00:19:18.711 (+02) [5] In HandleAsyncConnection: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeAssembly.get_DefinedTypes()
at DM.MovieApi.MovieDbFactory.ApiRequestResolver.GetAvailableConstructors(TypeInfo typeInfo) in C:_dev\github.nCubed\TheMovieDbWrapper\DM.MovieApi\MovieDbFactory.cs:line 179
at DM.MovieApi.MovieDbFactory.ApiRequestResolver.GetConstructor(Type t) in C:_dev\github.nCubed\TheMovieDbWrapper\DM.MovieApi\MovieDbFactory.cs:line 153
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory)
at DM.MovieApi.MovieDbFactory.ApiRequestResolver.GetT in C:_dev\github.nCubed\TheMovieDbWrapper\DM.MovieApi\MovieDbFactory.cs:line 126
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy`1.get_Value()
at myapp.myapp_Moviescraper.Query(String sQuery) in C:\Source\myapp\Moviescraper.cs:line 0
My code in Query is this:
public ArrayList Query(string sQuery)
{
var movieApi = MovieDbFactory.Create< IApiMovieRequest >().Value;
apiSearchResponse = Task.Run(() => {
return movieApi.SearchByTitleAsync(sQuery);
}).Result;
ArrayList pArray = new ArrayList();
foreach(MovieInfo pMovie in apiSearchResponse.Results)
{
DateTime dateTime = pMovie.ReleaseDate;
pArray.Add(pMovie.OriginalTitle + " (" + dateTime.Year.ToString() + ")");
}
return pArray;
This code runs just fine compiled as debug, but crashes as release.
Is this a known problem? Any tips to handle this exception?
Regards. Lars
I'm new with C#, I followed the sample and got this error. Please help me.
Exception thrown: 'System.InvalidOperationException' in System.Net.Http.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
private async void materialFlatButton1_Click(object sender, EventArgs e)
{
MovieDbFactory.RegisterSettings(this.getAPI(), "http://api.themoviedb.org/3/");
var movieApi = MovieDbFactory.Create<IApiMovieRequest>().Value;
ApiSearchResponse<MovieInfo> response = await movieApi.SearchByTitleAsync("Star Trek");
foreach (MovieInfo info in response.Results)
{
Console.WriteLine("{0} ({1}): {2}", info.Title, info.ReleaseDate, info.Overview);
}
}
Just wanted to know if it is possible to pull episode information from the API per tv show?
Currently, you only get the episode count as far as I'm aware.
Using TheMovieDbWrapper in a Xamarin Forms UWP project I get the following runtime exception:
An exception of type 'System.PlatformNotSupportedException' occurred in mscorlib.ni.dll
but was not handled in user code
Additional information: The value 'False' is not supported for property 'PreAuthenticate'.
I fixed it by removing line 145 from ApiRequestBase.cs
:
PreAuthenticate = false,
This should have no side-effects as PreAuthenticate defaults to false anyway. Could submit a pull-request with this.
The MovieCastMember object has a PersonId and Name, which represents the name of the actor. Is it possible to get any more information about the actor, like DOB, Bio, etc?
When using IApiPeopleRequest.FindByIdAsync() (retrieving cast members for top rated movies), I get the following unhandled exception:
Newtonsoft.Json.JsonReaderException: Could not convert string to DateTime: 1994. Path 'birtday', line 1, position 226.
Wouldn't it be appropriate for your Json serialization code to include an error delegate for handling DateTime parsing errors like this one?
SearchByNameAsync_GameOfThrones_Returns_PopulatedGenres()
needs to be updated to accommodate two search results being returned; as of a month or two ago, there was only a single result.
response.Results
Count = 2
[0]: {Game of Thrones (1399 - 2011-04-17)}
[1]: {Autópsia Game Of Thrones (138757 - 2020-04-14)}
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.