1 module vksdk.actions.Users; 2 3 import vksdk.client.AbstractAction; 4 import vksdk.client.VkApiClient; 5 import vksdk.client.actors.UserActor; 6 /*import vksdk.queries.users.UserField; 7 import vksdk.queries.users.UsersGetFollowersQuery; 8 import vksdk.queries.users.UsersGetFollowersQueryWithFields; 9 import vksdk.queries.users.UsersGetNearbyQuery;*/ 10 import vksdk.queries.users.UsersGetQuery; 11 /*import vksdk.queries.users.UsersGetSubscriptionsQuery; 12 import vksdk.queries.users.UsersGetSubscriptionsQueryWithExtended; 13 import vksdk.queries.users.UsersIsAppUserQuery; 14 import vksdk.queries.users.UsersReportQuery; 15 import vksdk.queries.users.UsersReportType; 16 import vksdk.queries.users.UsersSearchQuery;*/ 17 18 /** 19 * List of Users methods 20 */ 21 class Users : AbstractAction { 22 23 /** 24 * Constructor 25 * 26 * @param client vk api client 27 */ 28 this(VkApiClient client) { 29 super(client); 30 } 31 32 33 /** 34 * Returns detailed information on users. 35 */ 36 UsersGetQuery get() { 37 return new UsersGetQuery(getClient()); 38 } 39 /++ 40 /** 41 * Returns detailed information on users. 42 */ 43 UsersGetQuery get(UserActor actor) { 44 return new UsersGetQuery(getClient(), actor); 45 } 46 47 /** 48 * Returns a list of users matching the search criteria. 49 */ 50 UsersSearchQuery search(UserActor actor) { 51 return new UsersSearchQuery(getClient(), actor); 52 } 53 54 /** 55 * Returns information whether a user installed the application. 56 */ 57 UsersIsAppUserQuery isAppUser(UserActor actor) { 58 return new UsersIsAppUserQuery(getClient(), actor); 59 } 60 61 /** 62 * Returns a list of IDs of users and communities followed by the user. 63 */ 64 UsersGetSubscriptionsQuery getSubscriptions() { 65 return new UsersGetSubscriptionsQuery(getClient()); 66 } 67 68 /** 69 * Returns a list of IDs of users and communities followed by the user. 70 */ 71 UsersGetSubscriptionsQuery getSubscriptions(UserActor actor) { 72 return new UsersGetSubscriptionsQuery(getClient(), actor); 73 } 74 75 /** 76 * Returns a list of IDs of users and communities followed by the user. 77 */ 78 UsersGetSubscriptionsQueryWithExtended getSubscriptionsExtended() { 79 return new UsersGetSubscriptionsQueryWithExtended(getClient()); 80 } 81 82 /** 83 * Returns a list of IDs of users and communities followed by the user. 84 */ 85 UsersGetSubscriptionsQueryWithExtended getSubscriptionsExtended(UserActor actor) { 86 return new UsersGetSubscriptionsQueryWithExtended(getClient(), actor); 87 } 88 89 /** 90 * Returns a list of IDs of followers of the user in question, sorted by date added, most recent first. 91 */ 92 UsersGetFollowersQuery getFollowers() { 93 return new UsersGetFollowersQuery(getClient()); 94 } 95 96 /** 97 * Returns a list of IDs of followers of the user in question, sorted by date added, most recent first. 98 */ 99 UsersGetFollowersQuery getFollowers(UserActor actor) { 100 return new UsersGetFollowersQuery(getClient(), actor); 101 } 102 103 /** 104 * Returns a list of IDs of followers of the user in question, sorted by date added, most recent first. 105 */ 106 UsersGetFollowersQueryWithFields getFollowers(UserField...)(UserField fields) { 107 return new UsersGetFollowersQueryWithFields(getClient(), fields); 108 } 109 110 /** 111 * Returns a list of IDs of followers of the user in question, sorted by date added, most recent first. 112 */ 113 UsersGetFollowersQueryWithFields getFollowers(UserField[] fields) { 114 return new UsersGetFollowersQueryWithFields(getClient(), fields); 115 } 116 117 /** 118 * Returns a list of IDs of followers of the user in question, sorted by date added, most recent first. 119 */ 120 UsersGetFollowersQueryWithFields getFollowers(T, A...)(UserActor actor, UserField fields) { 121 return new UsersGetFollowersQueryWithFields(getClient(), actor, fields); 122 } 123 124 /** 125 * Returns a list of IDs of followers of the user in question, sorted by date added, most recent first. 126 */ 127 UsersGetFollowersQueryWithFields getFollowers(UserActor actor, UserField[] fields) { 128 return new UsersGetFollowersQueryWithFields(getClient(), actor, fields); 129 } 130 131 /** 132 * Reports (submits a complain about) a user. 133 */ 134 UsersReportQuery report(UserActor actor, int userId, UsersReportType type) { 135 return new UsersReportQuery(getClient(), actor, userId, type); 136 } 137 138 /** 139 * Indexes current user location and returns nearby users. 140 */ 141 UsersGetNearbyQuery getNearby(UserActor actor, float latitude, float longitude) { 142 return new UsersGetNearbyQuery(getClient(), actor, latitude, longitude); 143 }++/ 144 }