C# 클래스 BCXAPI.Service

파일 보기 프로젝트 열기: WeAreMammoth/bcxapi-dotnet

공개 메소드들

메소드 설명
GetAccessToken ( string code ) : dynamic

step 2: Given a code that the url from GetRequestAuthorizationURL eventually redirects back to and the clientsecret you can get an access token. store this token somewhere as you need to provide it to this wrapper to make calls.

GetAccessesForCalendar ( int accountID, int calendarID ) : dynamic
GetAccessesForProject ( int accountID, int projectID ) : dynamic
GetAccounts ( ) : dynamic
GetAttachments ( int accountID, int projectID ) : dynamic
GetCalendar ( int accountID, int calendarID ) : dynamic
GetCalendarEvent ( int accountID, int calendarID, int calendarEventID ) : dynamic
GetCalendarEventForProject ( int accountID, int projectID, int calendarEventID ) : dynamic
GetCalendarEvents ( int accountID, int calendarID, bool past = false ) : dynamic
GetCalendarEventsForProject ( int accountID, int projectID, bool past = false ) : dynamic
GetCalendars ( int accountID ) : dynamic
GetDocument ( int accountID, int projectID, int documentID ) : dynamic
GetDocuments ( int accountID, int projectID ) : dynamic
GetGlobalEvents ( int accountID, System.DateTime since = null, int page = 1 ) : dynamic
GetMessage ( int accountID, int projectID, int messageID ) : dynamic
GetPeople ( int accountID ) : dynamic
GetPerson ( int accountID, int personID ) : dynamic
GetPersonEvents ( int accountID, int personID, System.DateTime since = null, int page = 1 ) : dynamic
GetProject ( int accountID, int projectID ) : dynamic
GetProjectEvents ( int accountID, int projectID, System.DateTime since = null, int page = 1 ) : dynamic
GetProjects ( int accountID, bool archived = false ) : dynamic
GetRequestAuthorizationURL ( string>.Dictionary optionalArguments = null ) : string

step 1: get the URL to redirect your users to

GetTodo ( int accountID, int projectID, int todoID ) : dynamic
GetTodoList ( int accountID, int projectID, int todoListID ) : dynamic
GetTodoLists ( int accountID, int projectID, bool completed = false ) : dynamic
GetTodoListsWithAssignedTodos ( int accountID, int personID ) : dynamic
GetTopics ( int accountID, int projectID ) : dynamic
GetUpload ( int accountID, int projectID, int uploadID ) : dynamic
RefreshAccessToken ( ) : dynamic

call this when you get a TokenExpired exception and store the new access token for future requests

Service ( string clientID, string clientSecret, string redirectURI, string appNameAndContact, BCXAPI cache = null, dynamic accessToken = null ) : System

create a service class with an authorization token retrieved from GetAuthToken (if you have it). If you do not provide one then you will only be able to get the URL to the basecamp authorization requested page and to validate a code returned to you by that authorization. parameters come from the app you set up at integrate.37signals.com

비공개 메소드들

메소드 설명
_getJSONFromURL ( string url ) : dynamic

helper method to make a get request to basecamp. checks cache first if you've already received that response and checks with basecamp if you need to update your cache.

메소드 상세

GetAccessToken() 공개 메소드

step 2: Given a code that the url from GetRequestAuthorizationURL eventually redirects back to and the clientsecret you can get an access token. store this token somewhere as you need to provide it to this wrapper to make calls.
public GetAccessToken ( string code ) : dynamic
code string the code given to you by basecamp
리턴 dynamic

GetAccessesForCalendar() 공개 메소드

public GetAccessesForCalendar ( int accountID, int calendarID ) : dynamic
accountID int
calendarID int
리턴 dynamic

GetAccessesForProject() 공개 메소드

public GetAccessesForProject ( int accountID, int projectID ) : dynamic
accountID int
projectID int
리턴 dynamic

GetAccounts() 공개 메소드

public GetAccounts ( ) : dynamic
리턴 dynamic

GetAttachments() 공개 메소드

public GetAttachments ( int accountID, int projectID ) : dynamic
accountID int
projectID int
리턴 dynamic

GetCalendar() 공개 메소드

public GetCalendar ( int accountID, int calendarID ) : dynamic
accountID int
calendarID int
리턴 dynamic

GetCalendarEvent() 공개 메소드

public GetCalendarEvent ( int accountID, int calendarID, int calendarEventID ) : dynamic
accountID int
calendarID int
calendarEventID int
리턴 dynamic

GetCalendarEventForProject() 공개 메소드

public GetCalendarEventForProject ( int accountID, int projectID, int calendarEventID ) : dynamic
accountID int
projectID int
calendarEventID int
리턴 dynamic

GetCalendarEvents() 공개 메소드

public GetCalendarEvents ( int accountID, int calendarID, bool past = false ) : dynamic
accountID int
calendarID int
past bool
리턴 dynamic

GetCalendarEventsForProject() 공개 메소드

public GetCalendarEventsForProject ( int accountID, int projectID, bool past = false ) : dynamic
accountID int
projectID int
past bool
리턴 dynamic

GetCalendars() 공개 메소드

public GetCalendars ( int accountID ) : dynamic
accountID int
리턴 dynamic

GetDocument() 공개 메소드

public GetDocument ( int accountID, int projectID, int documentID ) : dynamic
accountID int
projectID int
documentID int
리턴 dynamic

GetDocuments() 공개 메소드

public GetDocuments ( int accountID, int projectID ) : dynamic
accountID int
projectID int
리턴 dynamic

GetGlobalEvents() 공개 메소드

public GetGlobalEvents ( int accountID, System.DateTime since = null, int page = 1 ) : dynamic
accountID int
since System.DateTime
page int
리턴 dynamic

GetMessage() 공개 메소드

public GetMessage ( int accountID, int projectID, int messageID ) : dynamic
accountID int
projectID int
messageID int
리턴 dynamic

GetPeople() 공개 메소드

public GetPeople ( int accountID ) : dynamic
accountID int
리턴 dynamic

GetPerson() 공개 메소드

public GetPerson ( int accountID, int personID ) : dynamic
accountID int
personID int
리턴 dynamic

GetPersonEvents() 공개 메소드

public GetPersonEvents ( int accountID, int personID, System.DateTime since = null, int page = 1 ) : dynamic
accountID int
personID int
since System.DateTime
page int
리턴 dynamic

GetProject() 공개 메소드

public GetProject ( int accountID, int projectID ) : dynamic
accountID int
projectID int
리턴 dynamic

GetProjectEvents() 공개 메소드

public GetProjectEvents ( int accountID, int projectID, System.DateTime since = null, int page = 1 ) : dynamic
accountID int
projectID int
since System.DateTime
page int
리턴 dynamic

GetProjects() 공개 메소드

public GetProjects ( int accountID, bool archived = false ) : dynamic
accountID int
archived bool
리턴 dynamic

GetRequestAuthorizationURL() 공개 메소드

step 1: get the URL to redirect your users to
public GetRequestAuthorizationURL ( string>.Dictionary optionalArguments = null ) : string
optionalArguments string>.Dictionary pass in this optional parameter to get these key value pairs passed back to your redirect URL in the query string
리턴 string

GetTodo() 공개 메소드

public GetTodo ( int accountID, int projectID, int todoID ) : dynamic
accountID int
projectID int
todoID int
리턴 dynamic

GetTodoList() 공개 메소드

public GetTodoList ( int accountID, int projectID, int todoListID ) : dynamic
accountID int
projectID int
todoListID int
리턴 dynamic

GetTodoLists() 공개 메소드

public GetTodoLists ( int accountID, int projectID, bool completed = false ) : dynamic
accountID int
projectID int
completed bool
리턴 dynamic

GetTodoListsWithAssignedTodos() 공개 메소드

public GetTodoListsWithAssignedTodos ( int accountID, int personID ) : dynamic
accountID int
personID int
리턴 dynamic

GetTopics() 공개 메소드

public GetTopics ( int accountID, int projectID ) : dynamic
accountID int
projectID int
리턴 dynamic

GetUpload() 공개 메소드

public GetUpload ( int accountID, int projectID, int uploadID ) : dynamic
accountID int
projectID int
uploadID int
리턴 dynamic

RefreshAccessToken() 공개 메소드

call this when you get a TokenExpired exception and store the new access token for future requests
public RefreshAccessToken ( ) : dynamic
리턴 dynamic

Service() 공개 메소드

create a service class with an authorization token retrieved from GetAuthToken (if you have it). If you do not provide one then you will only be able to get the URL to the basecamp authorization requested page and to validate a code returned to you by that authorization. parameters come from the app you set up at integrate.37signals.com
public Service ( string clientID, string clientSecret, string redirectURI, string appNameAndContact, BCXAPI cache = null, dynamic accessToken = null ) : System
clientID string your client id from 37s
clientSecret string your client secret from 37s
redirectURI string the redirect URI you set up with 37s - this must match
appNameAndContact string your application name and contact info - added to your request header
cache BCXAPI an optional cache to use for caching responses from 37s. if you don't provide one, it'll use the System.Runtime.Caching.MemoryCache.Default cache
accessToken dynamic if you have an access token, provide it here. this is the entire json object returned from the call to GetAccessToken
리턴 System