public RestClient(F1OAuthTicket ticket) : base(ticket) { _ticket = ticket; PeopleRealm = new Realms.Person(ticket, ticket.BaseURL); GivingRealm = new Realms.Giving(ticket, ticket.BaseURL); GroupsRealm = new Realms.F1Groups(ticket, ticket.BaseURL); ActivitiesRealm = new Realms.F1Activities(ticket, ticket.BaseURL); }
public void Setup() { this.Ticket = new F1OAuthTicket { ConsumerKey = ConfigurationManager.AppSettings["Consumer.Key"], ConsumerSecret = ConfigurationManager.AppSettings["Consumer.Secret"], ChurchCode = ConfigurationManager.AppSettings["Church.Code"], AccessToken = "", AccessTokenSecret = "" }; var response = RestClient.AuthorizeWithCredentials(this.Ticket, ConfigurationManager.AppSettings["UserName"], ConfigurationManager.AppSettings["Password"], bool.Parse(ConfigurationManager.AppSettings["FellowshipOne.Is.Staging"])); RestClient = new RestClient(response, bool.Parse(ConfigurationManager.AppSettings["FellowshipOne.Is.Staging"])); _testIndividualID = int.Parse(ConfigurationManager.AppSettings["Test.Individual.ID"]); }
public void Setup() { this.Ticket = new F1OAuthTicket { ConsumerKey = ConfigurationManager.AppSettings["Consumer.Key"], ConsumerSecret = ConfigurationManager.AppSettings["Consumer.Secret"], ChurchCode = ConfigurationManager.AppSettings["Church.Code"], AccessToken = "", AccessTokenSecret = "" }; RestClient = new RestClient(this.Ticket, false); var oauth = RestClient.AuthorizeWithCredentials(this.Ticket, ConfigurationManager.AppSettings["UserName"], ConfigurationManager.AppSettings["Password"], ConfigurationManager.AppSettings["API.Url"], "v1/PortalUser/AccessToken"); this.Ticket.AccessToken = oauth.AccessToken; this.Ticket.AccessTokenSecret = oauth.AccessTokenSecret; _testIndividualID = int.Parse(ConfigurationManager.AppSettings["Test.Individual.ID"]); }
public void Setup() { _appConfigFileMap.ExeConfigFilename = @"..\..\..\Common\bin\Debug\Common.dll.config"; //"C:\\dev\\tests\\Common\\bin\\Debug\\Common.dll.config"; _config = ConfigurationManager.OpenMappedExeConfiguration(_appConfigFileMap, ConfigurationUserLevel.None); this._environment = _config.AppSettings.Settings["FTTests.Environment"].Value; this._consumerKey = _config.AppSettings.Settings["FTTests.APIConsumerKey"].Value; this._consumerSecret = _config.AppSettings.Settings["FTTests.APIConsumerSecret"].Value; this._username = _config.AppSettings.Settings["FTTests.APIUsername"].Value; this._password = _config.AppSettings.Settings["FTTests.APIPassword"].Value; this._churchcode = _config.AppSettings.Settings["FTTests.APIChurchCode"].Value; this._authUrl = string.Format("v1/{0}/accesstoken", LoginType.PortalUser); this._accessToken = ""; this._accessTokenSecret = ""; BuildBaseUrl(); this.Ticket = new F1OAuthTicket { ConsumerKey = _consumerKey, ConsumerSecret = _consumerSecret, ChurchCode = _churchcode, AccessToken = _accessToken, AccessTokenSecret = _accessTokenSecret, BaseURL = _baseUrl, AuthURL = _authUrl }; RestClient = new RestClient(Ticket); var oauth = RestClient.AuthorizeWithCredentials(Ticket, _username, _password, Ticket.BaseURL, Ticket.AuthURL); Ticket.AccessToken = oauth.AccessToken; Ticket.AccessTokenSecret = oauth.AccessTokenSecret; // Create a new SQL class if (!"".Equals(this._dbConnectionString)) { this._sql = new FTTests.SQL(this._dbConnectionString); } }
public Person(F1OAuthTicket ticket, string baseUrl) { _ticket = ticket; _baseUrl = baseUrl; }
public ChurchConfigs(F1OAuthTicket ticket, string baseUrl) : base(ticket, baseUrl, ContentType.XML) { }
public F1Activities(F1OAuthTicket ticket, string baseUrl) { _ticket = ticket; _baseUrl = baseUrl; }
public void TearDown() { Ticket = null; Client = null; }
public F1Groups(F1OAuthTicket ticket, string baseUrl) { _ticket = ticket; _baseUrl = baseUrl; }
public GroupsRealm(F1OAuthTicket ticket, string baseUrl) { _ticket = ticket; _baseUrl = baseUrl; }
public Giving(F1OAuthTicket ticket, string baseUrl) { _ticket = ticket; _baseUrl = baseUrl; }