Advertisement
Guest User

Untitled

a guest
Apr 14th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using IO.Swagger.Api;
  2. using IO.Swagger.Client;
  3. using IO.Swagger.Model;
  4.  
  5. namespace SwaggerClientTest
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. //Create a new instance
  12. var clientConfig = new Configuration();
  13. //Add the username and password
  14. clientConfig.Username = "John";
  15. clientConfig.Password = "SecretPassword";
  16.  
  17. //Pass the config through the api ctor
  18. var petApi = new PetApi(clientConfig);
  19. //Call the Api
  20. Pet pet = petApi.GetPetById(1);
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement