/// <summary>
 /// Initialize a service reference based on the specified OAuth <paramref name="client"/>.
 /// </summary>
 /// <param name="client">The OAuth client.</param>
 /// <returns>An instance of <see cref="FlickrService"/>.</returns>
 public static FlickrService CreateFromOAuthClient(FlickrOAuthClient client)
 {
     if (client == null)
     {
         throw new ArgumentNullException(nameof(client));
     }
     return(new FlickrService(client));
 }
        /// <summary>
        /// Initializes a service instance based on the specified <paramref name="consumerKey"/> and
        /// <paramref name="consumerSecret"/> as well as the <paramref name="accessToken"/> and
        /// <paramref name="accessTokenSecret"/> of the authenticated user.
        /// </summary>
        /// <param name="consumerKey">The consumer key of your Flickr app.</param>
        /// <param name="consumerSecret">The consumer secret Flickr app.</param>
        /// <param name="accessToken">The access token of the authenticated user.</param>
        /// <param name="accessTokenSecret">The acess token secret of the authenticated user.</param>
        /// <returns>An instance of <see cref="FlickrService"/>.</returns>
        public static FlickrService CreateFromAccessToken(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret)
        {
            // Initialize a new OAuth client
            FlickrOAuthClient client = new FlickrOAuthClient(consumerKey, consumerSecret, accessToken, accessTokenSecret);

            // Initialize a new service instance
            return(new FlickrService(client));
        }
        /// <summary>
        /// Initializes a service instance based on the specified <paramref name="consumerKey"/> and
        /// <paramref name="consumerSecret"/>. This will create an API reference without a user context.
        /// </summary>
        /// <param name="consumerKey">The consumer key of your Flickr app.</param>
        /// <param name="consumerSecret">The consumer secret Flickr app.</param>
        /// <returns>An instance of <see cref="FlickrService"/>.</returns>
        public static FlickrService CreateFromConsumerKey(string consumerKey, string consumerSecret)
        {
            // Initialize a new OAuth client
            FlickrOAuthClient client = new FlickrOAuthClient(consumerKey, consumerSecret, null, null);

            // Initialize a new service instance
            return(new FlickrService(client));
        }
 /// <summary>
 /// Initializes a new instance based on the specified <paramref name="client"/>.
 /// </summary>
 /// <param name="client">The client.</param>
 protected FlickrService(FlickrOAuthClient client)
 {
     Client    = client;
     Galleries = new FlickrGalleriesEndpoint(this);
     Groups    = new FlickrGroupsEndpoint(this);
     People    = new FlickrPeopleEndpoint(this);
     Photosets = new FlickrPhotosetsEndpoint(this);
     Photos    = new FlickrPhotosEndpoint(this);
     Places    = new FlickrPlacesEndpoint(this);
     Test      = new FlickrTestEndpoint(this);
     Urls      = new FlickrUrlsEndpoint(this);
 }
示例#5
0
 internal FlickrPeopleRawEndpoint(FlickrOAuthClient client)
 {
     Client = client;
 }
示例#6
0
 /// <summary>
 /// Initializes a new instanced based on the <paramref name="client"/>.
 /// </summary>
 /// <param name="client">An instance of <see cref="FlickrOAuthClient"/> representing the parent OAuth client.</param>
 internal FlickrGroupsPoolsRawEndpoint(FlickrOAuthClient client)
 {
     Client = client;
 }
 internal FlickrPhotosRawEndpoint(FlickrOAuthClient client)
 {
     Client = client;
 }
示例#8
0
 /// <summary>
 /// Initializes a new instanced based on the <paramref name="client"/>.
 /// </summary>
 /// <param name="client">An instance of <see cref="FlickrOAuthClient"/> representing the parent OAuth client.</param>
 internal FlickrUrlsRawEndpoint(FlickrOAuthClient client)
 {
     Client = client;
 }
 internal FlickrTestRawEndpoint(FlickrOAuthClient client)
 {
     Client = client;
 }
示例#10
0
 internal FlickrGalleriesRawEndpoint(FlickrOAuthClient client)
 {
     Client = client;
 }