void onVKLogin() { VKRequest r = new VKRequest { url = "users.get?", CallBackFunction = tryLogInVk }; _vkapi.Call(r); }
void getPlayerRewardForGroup() { VKRequest r1 = new VKRequest() { url = "groups.isMember?group_id=" + gameSettings.vkGameGroupId, CallBackFunction = onPlayerRewardForGroup }; _vkapi.Call(r1); }
void setUpVKGamesButton() { VKRequest r1 = new VKRequest() { url = "groups.isMember?group_id=" + gameSettings.vkGamesOfficialGroupId, CallBackFunction = onVkGamesOfficialGroup }; _vkapi.Call(r1); }
void joinVKGamesHandler(VKRequest r) { if (r.error != null) { return; } joinVKGamesGroupButton.SetActive(false); goToVKGamesGroupButton.SetActive(true); }
void setUpCurrentUserFriends() { VKRequest r1 = new VKRequest() { url = "apps.getFriendsList?extended=1&count=30&type=invite&fields=photo_50", CallBackFunction = getFriendsHandler }; _vkapi.Call(r1); }
void getUserInfo() { VKRequest r = new VKRequest { url = "users.get?&fields=photo_50", CallBackFunction = OnGetUserInfo }; _vkapi.Call(r); }
void onLogout() { VKRequest r = new VKRequest { url = "users.get?", CallBackFunction = tryToLogOut }; _vkapi.Call(r); }
public void GetFriendsData() { var request = new VKRequest() { url = "friends.get?user_id=" + VkApi.CurrentToken.user_id + "&order=mobile&fields=photo_200&v=" + VkApi.VkSetts.apiVersion, CallBackFunction = OnGetFriendsCompleted, }; vkApi.Call(request); }
void joinBeaverTimeGroupHandler(VKRequest r) { if (r.error != null) { return; } getRewardForBeaverTimeGroup(); joinBeaverTimeGroupButton.SetActive(false); goToBeaverTimeGroupButton.SetActive(true); }
public VKRequest<StructEntity<bool>> AccountSetOffline( ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "account.setOffline", Parameters = new Dictionary<string, string> { } }; req.Token = CurrentToken; return req; }
public void Get3FriendsDataFromVk() { var request = new VKRequest() { url = "friends.get?user_id=" + VkApi.CurrentToken.user_id + "&count=3&fields=photo_200", CallBackFunction = OnGet5FriendsCompleted, }; vkapi.Call(request); //vkapi.call принимает 3 параметра строку запроса, функцию обработчика запроса, //и массив обеъктов(можно передать любые объекты, их пожно использовать в обработчике }
private static void TrackStats() { long appId = 0; bool appIdParsed = long.TryParse(Instance.CurrentAppID, out appId); if (Instance.AccessToken != null) { VKRequest checkUserInstallRequest = new VKRequest("apps.checkUserInstall", "platform", PLATFORM_ID, "app_id", appId.ToString(), "device_id", DeviceId); checkUserInstallRequest.Dispatch <object>((res) => { int responseVal = 0; if (res.Data != null && int.TryParse(res.Data.ToString(), out responseVal)) { if (responseVal == 1) { if (MobileCatalogInstallationDetected != null) { MobileCatalogInstallationDetected(null, EventArgs.Empty); } } } VKRequest trackVisitorRequest = new VKRequest("stats.trackVisitor"); trackVisitorRequest.Dispatch <object>((res2) => { }, (jsonStr) => new Object()); }); } else { if (!string.IsNullOrEmpty(DeviceId) && appIdParsed) { VKRequest checkUserInstallRequest = new VKRequest("apps.checkUserInstall", "platform", PLATFORM_ID, "app_id", appId.ToString(), "device_id", DeviceId); checkUserInstallRequest.Dispatch <object>((res) => { int responseVal = 0; if (res.Data != null && int.TryParse(res.Data.ToString(), out responseVal)) { if (responseVal == 1) { if (MobileCatalogInstallationDetected != null) { MobileCatalogInstallationDetected(null, EventArgs.Empty); } } } }); } } }
public virtual void Invite() { if (friend != null) { VKRequest r2 = new VKRequest() { url = "apps.sendRequest?user_id=" + friend.id + "&text=hello_from_vk_plugin2&type=invite&name=sayhello", CallBackFunction = OnAppSendRequest }; VkApi.VkApiInstance.Call(r2); } }
private void TriggerCaptchaButton_Click(object sender, RoutedEventArgs e) { var request = new VKRequest(new VKRequestParameters("captcha.force")); request.Dispatch <Object>((res) => { }, (json) => new Object()); VKRequest.Dispatch <object>( new VKRequestParameters("captcha.force"), (res) => {}, (json) => new object()); }
public virtual void Invite() { if (friend != null) { VKRequest r2 = new VKRequest() { url = "apps.sendRequest?user_id=" + friend.id + "&text=Побей мой рекорд в COLOR TUBE https://play.google.com/store/apps/details?id=com.IndieRoom.ColorTube&type=invite&name=inviteRequest&v=" + VkApi.VkSetts.apiVersion, CallBackFunction = OnAppSendRequest }; VkApi.VkApiInstance.Call(r2); } }
public VKRequest<StructEntity<bool>> AccountSetNameInMenu( string name ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "account.setNameInMenu", Parameters = new Dictionary<string, string> { { "name", name } } }; req.Token = CurrentToken; return req; }
public VKRequest<StructEntity<bool>> AccountSetOnline( bool voip = true ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "account.setOnline", Parameters = new Dictionary<string, string> { { "voip", (voip?1:0).ToNCString() } } }; req.Token = CurrentToken; return req; }
void sendVKScore() { if (_vkapi.IsUserLoggedIn) { VKRequest r1 = new VKRequest() { url = "https://api.vk.com/method/secure.addAppEvent?user_id=" + VkApi.CurrentToken.user_id + "&activity_id=2&value=" + _vkScore.ToString() + "&client_secret=ar0NKJWK7df9f5czE1za" + "&v=5.50&access_token=" + _vkClientKey + "&https=1", CallBackFunction = checkRequest }; _vkapi.Call(r1); } }
public VKRequest<StructEntity<bool>> AccountUnregisterDevice( string token ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "account.unregisterDevice", Parameters = new Dictionary<string, string> { { "token", token } } }; req.Token = CurrentToken; return req; }
void inviteFriendHandler(VKRequest request) { if (request.error != null) { return; } _playerData.playerScore += gameSettings.inviteFriendReward; _playerData.savePlayerData(); Action callback = request.data[0] as Action; callback(); }
/// <summary> /// Execute VKRequest & get response string /// </summary> /// <param name="request">Request targetInnerType execute</param> /// <param name="format">Response format(json|xml)</param> /// <returns>Response</returns> public static async Task <string> ExecRawAsync <T>(VKRequest <T> request, string format) where T : IVKEntity <T> { var bId = BuiltInData.Instance; var vk = bId.VKDomain; var query = String.Join("&", request .Parameters .Where(a => a.Value != "") .Select(a => a.Key + "=" + Uri.EscapeDataString(a.Value) #if COMMAS .Replace("%2C", ",") #endif ) ); var queryB = new StringBuilder(); queryB.Append("/method/"); queryB.Append(request.MethodName); queryB.Append(@"."); queryB.Append(format); if (request.Token != null) { queryB.Append("?access_token="); queryB.Append(request.Token.Token); queryB.Append("&v=5.21"); if (new Uri(vk).Scheme != "https") { queryB.Append( "&sig=" + BitConverter.ToString( bId.Hasher.ComputeHash( bId.TextEncoding .GetBytes(queryB + "&" + query + request.Token.Sign)) ) .Replace("-", "") .ToLower()); } } queryB.Insert(0, vk); var e = string.IsNullOrEmpty(query); return(await AWC.DownloadStringAsync( queryB.ToString(), bId.TextEncoding, null, null, e?AWC.RequestMethod.Get : AWC.RequestMethod.Post, e?null : query, 40000 )); }
/* some code */ public static LinkedList <GroupClass> GetGroupList() { var tmp1 = tmp; VKRequest.Dispatch <VKList <VKGroup> > (new VKRequestParameters("groups.get", "extended", "1", "filter", "admin, editor, moder", "fields", "photo_100"), (res) => { if (res.ResultCode == VKResultCode.Succeeded && res.Data.count > 0) { var item = res.Data.items[0]; tmp1.AddLast(new GroupClass(item.id, item.name, item.screen_name, item.photo_100)); } }); //here return(tmp1); }
public void onLoggedIn() { try { VkApi.VkApiInstance.LoggedIn -= onLoggedIn; } catch (System.Exception ex) { } VKRequest r = new VKRequest { url = "users.get?user_ids=51066050&photo_50", CallBackFunction = OnGotUserInfo }; VkApi.VkApiInstance.Call(r); }
void joinVkGameGroupHandler(VKRequest r) { if (r.error != null) { return; } if (_playerData.inVkGameGroup == false) { _playerData.playerScore += gameSettings.joinGroupReward; _playerData.inVkGameGroup = true; _playerData.savePlayerData(); } }
private void GetFriends_Click(object sender, RoutedEventArgs e) { VKRequest.Dispatch <VKList <VKUser> >(new VKRequestParameters("friends.get", "fields", "photo_200"), (res) => { VKExecute.ExecuteOnUIThread(() => { if (res.ResultCode == VKResultCode.Succeeded && res.Data.count > 0) { friends.Text = "Example Friend name: " + res.Data.items[0].first_name + " " + res.Data.items[0].last_name; } }); }); }
public void inviteFriend(string friendId, string friendName, Action aCallback) { string inviteTextTemplate = SmartLocalization.LanguageManager.Instance.GetTextValue(gameSettings.inviteTextKey); string inviteText = string.Format(inviteTextTemplate, friendName); VKRequest r1 = new VKRequest() { url = "apps.sendRequest?user_id=" + friendId + "&text=" + inviteText + "&type=invite&name=BeaverTime", CallBackFunction = inviteFriendHandler, data = new Action[] { aCallback }, }; _vkapi.Call(r1); }
public void tryLogInVk(VKRequest request) { if (request.error != null) { return; } if (VkApi.CurrentToken == null) { return; } logInButton.SetActive(false); logOutButton.SetActive(true); getUserInfo(); }
public void sendInVkPlayerScore(int aScore) { if (_vkapi.IsUserLoggedIn) { _vkScore = aScore; string fullurl = "https://oauth.vk.com/access_token?client_id=" + VkApi.VkSetts.VkAppId.ToString() + "&client_secret=ar0NKJWK7df9f5czE1za" + "&v=5.60&grant_type=client_credentials"; VKRequest r1 = new VKRequest() { url = fullurl, CallBackFunction = getClientKey, data = new Action[] { sendVKScore }, }; _vkapi.Call(r1); } }
=> InputString.Substring(0, InputString.IndexOf('?')); //верси C# 6.0 новый синтаксис) private void textRequest_TextChanged(object sender, TextChangedEventArgs e) { VKRequest.Dispatch <VKList <VKAudio> >(new VKRequestParameters( "audio.search", "q", textRequest.Text), (result) => { try { audioView.ItemsSource = result.Data.items; } catch { } } ); }
private void textRequest_TextChanged(object sender, TextChangedEventArgs e) { if ((sender as TextBox).Text != "") { VKRequest.Dispatch <VKList <NewVKAudio> >(new VKRequestParameters( "audio.search", "q", (sender as TextBox).Text ), (result) => { audioView.ItemsSource = result.Data.items; } ); } }
private async Task <EntityList <Post> > GetBigWall(int ownerId, int offset) { var vk = GetNewVkApi(); var req = new VKRequest <EntityList <Post> >() { MethodName = "execute.wallGet25r", Token = vk.CurrentToken, Parameters = new Dictionary <string, string>() { { "offset", offset.ToString() }, { "owner_id", ownerId.ToString() } } }; Sleep(); return((await vk.Executor.ExecAsync(req)).Response); }
// Use this for initialization public void SendNotificationToAdmin() { VKRequest r1 = new VKRequest() { url = "apps.sendRequest?user_id=" + input.text + "&text=Новая викторина Вконтакте бросает тебе вызов! Установи игру прямо сейчас!&type=request&name=test1", CallBackFunction = OnAppSendRequest }; VKRequest r2 = new VKRequest() { url = "apps.sendRequest?user_id=" + input.text + "&text=hello_from_vk_plugin2&type=request&name=sayhello2", CallBackFunction = OnAppSendRequest }; VkApi.VkApiInstance.Call(r1); //VkApi.VkApiInstance.Call (r2); }
void getClientKey(VKRequest request) { if (request.error != null) { return; } var dict = Json.Deserialize(request.response) as Dictionary <string, object>; var resp = (Dictionary <string, object>)dict; var access_token = (String)resp["access_token"]; _vkClientKey = access_token; Action callback = request.data[0] as Action; callback(); }
protected override void OnRestoreInstanceState(Bundle savedInstanceState) { base.OnRestoreInstanceState(savedInstanceState); var response = savedInstanceState.GetString("response"); SetResponseText(response); long requestId = savedInstanceState.GetLong("request"); myRequest = VKRequest.GetRegisteredRequest(requestId); if (myRequest != null) { myRequest.UnregisterObject(); myRequest.SetRequestListener(OnRequestComplete, OnRequestError, OnRequestProgress, OnRequestAttemptFailed); } }
public VKRequest<StructEntity<bool>> AccountSetSilenceMode( string token , int time , uint? chatId = null, uint? userId = null, int sound = 0 ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "account.setSilenceMode", Parameters = new Dictionary<string, string> { { "token", token }, { "time", time.ToNCString() }, { "chat_id", MiscTools.NullableString(chatId) }, { "user_id", MiscTools.NullableString(userId) }, { "sound", sound.ToNCString() } } }; req.Token = CurrentToken; return req; }
public async Task<User[]> UsersSearchAsync( UsersSearchParams usersSearchParams ) { var req = new VKRequest<User> { MethodName = "users.search", Parameters = new Dictionary<string, string> { { "q", usersSearchParams.Query }, { "sort", ( (int) usersSearchParams.Sort ).ToNCString() }, { "offset", MiscTools.NullableString( usersSearchParams.Offset ) }, { "count", MiscTools.NullableString( usersSearchParams.Count ) }, { "fields", String.Join( ",", MiscTools.GetUserFields( usersSearchParams.Fields ) ) }, { "city", MiscTools.NullableString( usersSearchParams.CityId ) }, { "country", MiscTools.NullableString( usersSearchParams.CountryId ) }, { "hometown", usersSearchParams.Hometown }, { "university_country", MiscTools.NullableString( usersSearchParams.UniversityCountryId ) }, { "university", MiscTools.NullableString( usersSearchParams.UniversityId ) }, { "university_year", MiscTools.NullableString( usersSearchParams.UniversityYear ) }, { "sex", usersSearchParams.Sex != null ? ( (int) usersSearchParams.Sex ).ToNCString() : "" }, { "status", MiscTools.NullableString( usersSearchParams.Relation ) }, { "age_from", MiscTools.NullableString( usersSearchParams.AgeFrom ) }, { "age_to", MiscTools.NullableString( usersSearchParams.AgeTo ) }, { "birth_day", MiscTools.NullableString( usersSearchParams.BirthDay ) }, { "birth_month", MiscTools.NullableString( usersSearchParams.BirthMonth ) }, { "birth_year", MiscTools.NullableString( usersSearchParams.BirthYear ) }, { "online", MiscTools.NullableString( usersSearchParams.Online.HasValue ? (uint?) ( usersSearchParams.Online.Value ? 1 : 0 ) : null ) }, { "has_photo", MiscTools.NullableString( usersSearchParams.HasPhoto.HasValue ? (uint?) ( usersSearchParams.HasPhoto.Value ? 1 : 0 ) : null ) }, { "school_country", MiscTools.NullableString( usersSearchParams.SchoolCountryId ) }, { "school_city", MiscTools.NullableString( usersSearchParams.SchoolCityId ) }, { "school", MiscTools.NullableString( usersSearchParams.SchoolId ) }, { "school_year", MiscTools.NullableString( usersSearchParams.SchoolYear ) }, { "religion", usersSearchParams.Religion }, { "interests", usersSearchParams.Interests }, { "company", usersSearchParams.Company }, { "position", usersSearchParams.Position }, { "group_id", MiscTools.NullableString( usersSearchParams.GroupId ) } }, Token = IsLogged ? CurrentToken : null }; return ( await _executor.ExecAsync( req ) ).Data; }
public VKRequest<StructEntity<int>> FriendsGetMutual( uint targetUid , uint? sourceUid = null, bool order = false, uint offset = 0, uint count = 100 ){ var req = new VKRequest<StructEntity<int>>{ MethodName = "friends.getMutual", Parameters = new Dictionary<string, string> { { "target_uid", targetUid.ToNCString() }, { "source_uid", MiscTools.NullableString(sourceUid) }, { "order", order ? "random" : "" }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<EntityList<Document>> DocsGet( int? ownerId = null, uint offset = 0, uint count = 100 ){ var req = new VKRequest<EntityList<Document>>{ MethodName = "docs.get", Parameters = new Dictionary<string, string> { { "owner_id", MiscTools.NullableString(ownerId) }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<DatabaseCity> DatabaseGetCitiesById( params uint[] cityIds ){ var req = new VKRequest<DatabaseCity>{ MethodName = "database.getCitiesById", Parameters = new Dictionary<string, string> { { "city_ids", (cityIds??new uint[]{}).ToNCStringA() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
private void TriggerCaptchaButton_Click(object sender, RoutedEventArgs e) { var request = new VKRequest(new VKRequestParameters("captcha.force")); request.Dispatch<Object>((res) => { }, (json) => new Object()); }
public VKRequest<DatabaseEntry> DatabaseGetSchools( uint? cityId = null, string q = "", uint offset = 0, uint count = 100 ){ var req = new VKRequest<DatabaseEntry>{ MethodName = "database.getSchools", Parameters = new Dictionary<string, string> { { "city_id", MiscTools.NullableString(cityId) }, { "q", q }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<User> FriendsGetByPhones( UserFields fields = UserFields.None, ulong[] phones = null ){ var req = new VKRequest<User>{ MethodName = "friends.getByPhones", Parameters = new Dictionary<string, string> { { "fields", String.Join( ",", MiscTools.GetUserFields( fields ) ) }, { "phones", String.Join( ",", phones.Select( a => "+" + a ) ) } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<StructEntity<long>> AccountGetAppPermissions( uint? userId = null ){ var req = new VKRequest<StructEntity<long>>{ MethodName = "account.getAppPermissions", Parameters = new Dictionary<string, string> { { "user_id", MiscTools.NullableString(userId) } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<EntityList<User>> FriendsGetSuggestions( FriendSuggestionFilters filters = FriendSuggestionFilters.Everything, UserFields fields = UserFields.None, NameCase nameCase = NameCase.Nom, uint offset = 0, uint count = 100 ){ var req = new VKRequest<EntityList<User>>{ MethodName = "friends.getSuggestions", Parameters = new Dictionary<string, string> { { "filters", String.Join( ",", MiscTools.GetFilterFields( filters ) ) }, { "fields", String.Join( ",", MiscTools.GetUserFields( fields ) ) }, { "name_case", nameCase.ToNClString() }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; req.Token = CurrentToken; return req; }
public VKRequest<EntityList<User>> FriendsGet( uint? userId = null, uint? listId = null, UserFields fields = UserFields.None, UserSortOrder order = UserSortOrder.ById, NameCase nameCase = NameCase.Nom, uint offset = 0, uint count = 100 ){ var req = new VKRequest<EntityList<User>>{ MethodName = "friends.get", Parameters = new Dictionary<string, string> { { "user_id", MiscTools.NullableString(userId) }, { "list_id", MiscTools.NullableString(listId) }, { "fields", String.Join( ",", MiscTools.GetUserFields( fields ) ) }, { "order", order.ToNClString() }, { "name_case", nameCase.ToNClString() }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<Document> DocsSave( string file , string title , params string[] tags ){ var req = new VKRequest<Document>{ MethodName = "docs.save", Parameters = new Dictionary<string, string> { { "file", file }, { "title", title }, { "tags", String.Join(",",tags) } } }; req.Token = CurrentToken; return req; }
public VKRequest<Document> DocsGetById( params Tuple<int,int>[] docs ){ var req = new VKRequest<Document>{ MethodName = "docs.getById", Parameters = new Dictionary<string, string> { { "docs", String.Join(",",docs.Select(a=>a.Item1 +"_" +a.Item2)) } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<StructEntity<bool>> DocsDelete( long docId , int? ownerId = null ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "docs.delete", Parameters = new Dictionary<string, string> { { "doc_id", docId.ToNCString() }, { "owner_id", MiscTools.NullableString(ownerId) } } }; req.Token = CurrentToken; return req; }
public VKRequest<StructEntity<int>> DocsAdd( long docId , int ownerId , string accessKey = "" ){ var req = new VKRequest<StructEntity<int>>{ MethodName = "docs.add", Parameters = new Dictionary<string, string> { { "doc_id", docId.ToNCString() }, { "owner_id", ownerId.ToNCString() }, { "access_key", accessKey } } }; req.Token = CurrentToken; return req; }
public VKRequest<StructEntity<int>> FriendsAdd( uint userId , string text = "" ){ var req = new VKRequest<StructEntity<int>>{ MethodName = "friends.add", Parameters = new Dictionary<string, string> { { "user_id", userId.ToNCString() }, { "text", text } } }; req.Token = CurrentToken; return req; }
private void Publish() { if (_isPublishing) { return; } _isPublishing = true; UpdateState(); var parameters = PrepareParameters(); var request = new VKRequest(parameters); request.Dispatch<object>( (res) => { if (res.ResultCode == VKResultCode.Succeeded) { VKExecute.ExecuteOnUIThread(()=> { NavigationService.GoBack(); _isPublishing = false; UpdateState(); }); } else { VKExecute.ExecuteOnUIThread(() => { MessageBox.Show(Localization.Resources.Error); _isPublishing = false; UpdateState(); }); } }); }
public VKRequest<StructEntity<bool>> FriendsDeleteAllRequests( ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "friends.deleteAllRequests", Parameters = new Dictionary<string, string> { } }; req.Token = CurrentToken; return req; }
public VKRequest<StructEntity<int>> FriendsGetRecent( uint count = 20 ){ var req = new VKRequest<StructEntity<int>>{ MethodName = "friends.getRecent", Parameters = new Dictionary<string, string> { { "count", count.ToNCString() } } }; req.Token = CurrentToken; return req; }
public VKRequest<StructEntity<int>> FriendsDelete( uint userId ){ var req = new VKRequest<StructEntity<int>>{ MethodName = "friends.delete", Parameters = new Dictionary<string, string> { { "user_id", userId.ToNCString() } } }; req.Token = CurrentToken; return req; }
public VKRequest<DatabaseCity> DatabaseGetCities( uint countryId , uint? regionId = null, string q = "", bool needAll = false, uint offset = 0, uint count = 100 ){ var req = new VKRequest<DatabaseCity>{ MethodName = "database.getCities", Parameters = new Dictionary<string, string> { { "country_id", countryId.ToNCString() }, { "region_id", MiscTools.NullableString(regionId) }, { "q", q }, { "need_all", (needAll?1:0).ToNCString() }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<StructEntity<bool>> FriendsDeleteList( uint listId ){ var req = new VKRequest<StructEntity<bool>>{ MethodName = "friends.deleteList", Parameters = new Dictionary<string, string> { { "list_id", listId.ToNCString() } } }; req.Token = CurrentToken; return req; }
public VKRequest<EntityList<DatabaseEntry>> DatabaseGetCountries( string code = "", bool needAll = false, uint offset = 0, uint count = 100 ){ var req = new VKRequest<EntityList<DatabaseEntry>>{ MethodName = "database.getCountries", Parameters = new Dictionary<string, string> { { "code", code }, { "need_all", (needAll?1:0).ToNCString() }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<StructEntity<int>> FriendsGetAppUsers( ){ var req = new VKRequest<StructEntity<int>>{ MethodName = "friends.getAppUsers", Parameters = new Dictionary<string, string> { } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<EntityList<DatabaseEntry>> DatabaseGetChairs( uint facultyId , uint offset = 0, uint count = 100 ){ var req = new VKRequest<EntityList<DatabaseEntry>>{ MethodName = "database.getChairs", Parameters = new Dictionary<string, string> { { "faculty_id", facultyId.ToNCString() }, { "offset", offset.ToNCString() }, { "count", count.ToNCString() } } }; if (IsLogged){ req.Token = CurrentToken; } return req; }
public VKRequest<SimpleEntity<string>> DocsGetWallUploadServer( uint? groupId = null ){ var req = new VKRequest<SimpleEntity<string>>{ MethodName = "docs.getWallUploadServer", Parameters = new Dictionary<string, string> { { "group_id", MiscTools.NullableString(groupId) } } }; req.Token = CurrentToken; return req; }