Пример #1
0
        /// <summary>
        /// Get information about the currently authenticated users relationship with another user
        /// http://instagram.com/developer/endpoints/relationships/#get_relationship
        /// </summary>
        /// <param name="foreignUserId">The id of the user to get the current users relationship status with</param>
        /// <returns>An ApiSingleResponse with a RelationshipStatus record</returns>
        public ApiSingleResponse <RelationshipStatus> Relationship(string foreignUserId)
        {
            string json = GetJSON(string.Format(ApiUrls.RELATIONSHIP_URL, foreignUserId, base._token), null);
            ApiSingleResponse <RelationshipStatus> response = json.Deserialize <ApiSingleResponse <RelationshipStatus> >();

            return(response);
        }
Пример #2
0
        /// <summary>
        /// Get basic information about the currently authenticated user
        /// http://instagram.com/developer/endpoints/users/#get_users
        /// </summary>
        /// <param name="userId">the id of the user to get information for (self if null)</param>
        /// <returns>An ApiSingleReponse containing a single Instagram user record on the data node.</returns>
        public ApiSingleResponse <InstagramUser> User(string userId)
        {
            string json = GetJSON(string.Format(ApiUrls.USER_URL, !string.IsNullOrEmpty(userId) ? userId : "self", base._token), null);
            ApiSingleResponse <InstagramUser> response = json.Deserialize <ApiSingleResponse <InstagramUser> >();

            return(response);
        }