This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
08 Null Handling
Henrik Fröhling edited this page Dec 1, 2016
·
2 revisions
The Trakt API might not return all data, especially not when you are using the extended info. Therefore, you should check object properties, if they are null or not.
var user = client.Users.GetUserProfileAsync("username");
var userAvatarUrl = user.Images?.Avatar?.Full; // will be null
// with images
var user = client.Users.GetUserProfileAsync("username", new TraktExtendedInfo { Images = true });
var userAvatarUrl = user.Images?.Avatar?.Full; // could be null
- Installation
- NuGet
- DLL Binaries
- Build from Source
- Namespaces
- Basic Setup
- Configuration
- Authentication
- Authorization
- OAuth Authentication
- Device Authentication
- Refresh Authentication
- Revoke Authentication
- Async
- Exception Handling
- Null Handling
- Modules
- Authentication
- Authentication - OAuth
- Authentication - Devices
- Calendar
- Checkins
- Certifications
- Comments
- Genres
- Movies
- Networks
- People
- Recommendations
- Scrobble
- Search
- Shows
- Seasons
- Episodes
- Sync
- Users
- Request Parameters
- Extended Info
- Filters
- Multiple Ids
- Services
- Serialization Service
- Language Service