1 module vksdk.client.VkApiClient; 2 3 import vksdk.actions.OAuth; 4 import vksdk.actions.Users; 5 import vksdk.client.TransportClient; 6 7 class VkApiClient { 8 9 private immutable string API_VERSION = "5.62"; 10 private immutable string API_ADDRESS = "https://api.vk.com/method/"; 11 private immutable string OAUTH_ENDPOINT = "https://oauth.vk.com/"; 12 13 private TransportClient transportClient; 14 15 this(TransportClient transportClient) { 16 this.transportClient = transportClient; 17 } 18 19 TransportClient getTransportClient() { 20 return transportClient; 21 } 22 23 string getApiEndpoint() { 24 return API_ADDRESS; 25 } 26 27 string getOAuthEndpoint() { 28 return OAUTH_ENDPOINT; 29 } 30 31 string getVersion() { 32 return API_VERSION; 33 } 34 35 OAuth oauth() { 36 return new OAuth(this); 37 } 38 /* 39 public Account account() { 40 return new Account(this); 41 } 42 43 public Auth auth() { 44 return new Auth(this); 45 } 46 47 public Friends friends() { 48 return new Friends(this); 49 }*/ 50 51 public Users users() { 52 return new Users(this); 53 } 54 55 /*public com.vk.api.sdk.actions.Utils utils() { 56 return new com.vk.api.sdk.actions.Utils(this); 57 } 58 59 public Wall wall() { 60 return new Wall(this); 61 } 62 63 public Execute execute() { 64 return new Execute(this); 65 }*/ 66 }