public InstagramResponse<User> UserDetails(string userid, string accessToken)
{
if (userid == "self")
return CurrentUserDetails(accessToken);
string url = Configuration.ApiBaseUrl + "users/" + userid + "?access_token=" + accessToken;
if (string.IsNullOrEmpty(accessToken))
url = Configuration.ApiBaseUrl + "users/" + userid + "?client_id=" + Configuration.ClientId;
if (_cache != null)
if (_cache.Exists(url))
return _cache.Get<InstagramResponse<User>>("users/" + userid);
string json = RequestGetToUrl(url,Configuration.Proxy);
if (string.IsNullOrEmpty(json))
return null;
InstagramResponse<User> res = DeserializeObject<InstagramResponse<User>>(json);
if (!string.IsNullOrEmpty(accessToken)) {
//CurrentUserIsFollowing(userid, accessToken);
res.data.isFollowed = CurrentUserIsFollowing(res.data.id,accessToken);
}
if (_cache != null)
_cache.Add("users/" + userid, res, 600);
return res;
}
public InstagramResponse<User[]> UsersSearch(string query, string count, string accessToken)