static void Main(string[] args) { String username = "******"; String password = "******"; vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi(); vestorly.model.Session response = sessionsApi.Login(username, password); System.Diagnostics.Debug.WriteLine("MY RESPONSE " + response); String auth = response.vestorlyAuth; System.Diagnostics.Debug.WriteLine(auth); advisorsApiTest(username, password, auth, response); postsApiTest(username, password, auth); articlesApiTest(username, password, auth); sourcesApiTest(username, password, auth); newslettersApiTest(username, password, auth); newslettersettingsApiTest(username, password, auth); eventsApiTest(username, password, auth); groupsApiTest(username, password, auth); membersApiTest(username, password, auth); membereventsApiTest(username, password, auth); memberreportsApiTest(username, password, auth); sessionsApiTest(username, password, auth, response); }
public static void sessionsApiTest(String username, String password, String auth, vestorly.model.Session mySession) { System.Diagnostics.Debug.WriteLine("\n\nSTART OF SESSIONSAPI TEST\n\n"); vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi(); // POST System.Diagnostics.Debug.WriteLine("POST: " + mySession); // DELETE System.Diagnostics.Debug.WriteLine("DELETE{ID}: " + sessionsApi.Logout(auth, mySession.currentUser.id)); System.Diagnostics.Debug.WriteLine("All SessionsApi Tests have passed!"); }