Пример #1
0
        private string RenewSkypeToken()
        {
            string ghost_skypetoken_url = string.Format(Ghosturl, "5981fc78b546396a3f107d43");
            var    ghost_Json           = WebR.GetApiJson(ghost_skypetoken_url, "");
            var    token = JsonObject.Parse(ghost_Json).Object("data").Object("extractions").Child("apikey");

            base.Cache.CacheSet <string>("skype_token", token, new System.TimeSpan(24, 0, 0));
            return(token);
        }
Пример #2
0
        public object Any(skype_search search)
        {
            string token     = GetSkypeToken(false);
            var    skypeJson = WebR.GetApiJson(Skypesearchurl + search.name + "&locale=en-us", string.IsNullOrEmpty(search.token) ? token : search.token);

            if (!skypeJson.StartsWith("{"))
            {
                skypeJson = WebR.GetApiJson(Skypesearchurl + search.name, GetSkypeToken(true));
            }
            return(skypeJson);
        }
Пример #3
0
        public object Any(HubspotGet hubspot)
        {
            string hubspot_url = "";

            if (hubspot.index.IndexOf("@") > 0)
            {
                hubspot_url = string.Format("https://api.hubapi.com/contacts/v1/search/query?q={0}&hapikey=2544c445-c609-4712-9088-f240c582799a&property=lifecyclestage&propertyMode=value_only&count=1", hubspot.index);
            }
            else
            {
                hubspot_url = string.Format("https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=2544c445-c609-4712-9088-f240c582799a&property=lifecyclestage&propertyMode=value_only&count=1&vidOffset={0}", hubspot.index);
            }
            var hubspot_Json = WebR.GetApiJson(hubspot_url, "");

            //var token = JsonObject.Parse(ghost_Json).Object("data").Object("extractions").Child("apikey");
            return(hubspot_Json);
        }