/// <summary> /// Search public activities. /// </summary> /// <param name="query">Full-text search query string. </param> /// <param name="access"></param> /// <returns></returns> public JArray Get_Activities_Search(string query, string access) { oAuthToken objToken = new oAuthToken(_clientId, _clientSecret, _redirectUrl); string RequestUrl = Globals.strGetSearchActivity + "?query=" + query + "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)); }
/// <summary> /// List all of the activities in the specified collection for a particular user. /// </summary> /// <param name="UserId"></param> /// <param name="access"></param> /// <returns></returns> public JArray Get_Activities_List(string UserId, string access) { oAuthToken objToken = new oAuthToken(); string RequestUrl = Globals.strGetActivitiesList + UserId + "/activities/public?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)); }
/// <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 a person's profile. /// </summary> /// <param name="UserId"></param> /// <param name="access"></param> /// <returns></returns> public JArray Get_People_Profile(string UserId, string access) { oAuthToken objToken = new oAuthToken(_clientId, _clientSecret, _redirectUrl); string RequestUrl = Globals.strGetPeopleProfile + UserId + "?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)); }