/// <summary> /// List all of the people who this user has added to one or more circles. /// </summary> /// <param name="userId"></param> /// <param name="access"></param> /// <param name="collection"></param> /// <returns></returns> public JArray Get_People_List(string userId, string access, string collection) { oAuthToken objToken = new oAuthToken(); string RequestUrl = Globals.strGetPeopleList + userId + "/people/" + collection + "?access_token=" + access; Uri path = new Uri(RequestUrl); string[] header = { "token_type", "expires_in" }; string[] val = { "Bearer", "3600" }; string response = objToken.WebRequestHeader(path, header, val); if (!response.StartsWith("[")) response = "[" + response + "]"; return JArray.Parse(response); }
/// <summary> /// Search all public profiles /// </summary> /// <param name="query"></param> /// <param name="access"></param> /// <returns></returns> public JArray Get_People_Search(string query, string access) { oAuthToken objToken = new oAuthToken(); string RequestUrl = Globals.strGetSearchPeople + query + "&access_token=" + access; Uri path = new Uri(RequestUrl); string[] header = { "token_type", "expires_in" }; string[] val = { "Bearer", "3600" }; string response = objToken.WebRequestHeader(path, header, val); if (!response.StartsWith("[")) response = "[" + response + "]"; return JArray.Parse(response); }
/// <summary> /// Get an activity by Id. /// </summary> /// <param name="ActivityId"></param> /// <param name="access"></param> /// <returns></returns> public JArray Get_Activity_By_Id(string ActivityId, string access) { oAuthToken objToken = new oAuthToken(); string RequestUrl = Globals.strGetActivityById + ActivityId + "?access_token=" + access; Uri path = new Uri(RequestUrl); string[] header = { "token_type", "expires_in" }; string[] val = { "Bearer", "3600" }; string response = string.Empty; try { response = objToken.WebRequestHeader(path, header, val); if (!response.StartsWith("[")) response = "[" + response + "]"; } catch (Exception Err) { Console.Write(Err.StackTrace); } return JArray.Parse(response); }