RetrieveAuthenticationData() public static method

public static RetrieveAuthenticationData ( String providerName ) : AuthenticationData
providerName String
return AuthenticationData
Esempio n. 1
0
        protected override IEnumerable <IRecord> OnProcessRecord(IRecord record, IDictionary <string, object> runtimeParams)
        {
            AuthenticationData auth = AuthenticationData.RetrieveAuthenticationData(LINKEDIN_OAUTHPROVIDER_NAME);

            switch (QueryType)
            {
            case "Social":
                return(ExecuteSocialSearch(auth, runtimeParams));

            case "People":
                return(ExecutePeopleSearch(auth, runtimeParams));

            case "Profile":
                return(ExecuteProfileSearch(auth, runtimeParams));

            case "Companies":
                return(ExecuteCompanySearch(auth, runtimeParams));

            case "CompanyShares":
                return(ExecuteCompanySharesSearch(auth, runtimeParams));

            case "BusinessProfile":
                return(ExecuteBusinessProfileSearch(auth, runtimeParams));

            default:
                throw new Exception("Unexpected QueryType value '" + QueryType + "'.  Valid values are Social, People.");
            }
        }
Esempio n. 2
0
        protected override System.Collections.Generic.IEnumerable <IRecord> OnProcessRecord(IRecord record, System.Collections.Generic.IDictionary <string, object> runtimeParams)
        {
            string text = this._query.Evaluate(base.Mashup, record, runtimeParams);

            AuthenticationData auth = AuthenticationData.RetrieveAuthenticationData(TWITTER_OAUTHPROVIDER_NAME);

            System.Collections.Generic.Dictionary <string, object> parameters = this.Parameters.ToDictionary((Parameter param) => param.Name, (Parameter param) => param.Evaluate(this.Mashup, record, runtimeParams));
            System.Collections.Generic.IList <string> aliases = this.ParseAliases();
            base.WriteLog("Executing {0}", new object[]
            {
                text.Replace("\r", " ").Replace("\n", " ").Replace("  ", " ")
            });
            return(this.Executor.Execute(text,
                                         this._maximumResults,
                                         auth.ConsumerKey,
                                         auth.ConsumerSecret,
                                         auth.Token,
                                         auth.TokenSecret,
                                         parameters, aliases));
        }