Beispiel #1
0
        public Task <ApiRequest <int?> > GetAppBalance(ServiceAccessToken accessToken)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
            };

            return(RequestManager.CreateRequestAsync <int?>("secure.getAppBalance", accessToken, request));
        }
Beispiel #2
0
        public Task <ApiRequest <StreamingGetServerUrlResponse> > GetServerUrl(ServiceAccessToken accessToken)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
            };

            return(RequestManager.CreateRequestAsync <StreamingGetServerUrlResponse>("streaming.getServerUrl", accessToken, request));
        }
Beispiel #3
0
        public Task <ApiRequest <IEnumerable <BaseObject> > > GetCitiesById(ServiceAccessToken accessToken, IEnumerable <int?> cityIds = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["city_ids"]     = RequestHelpers.ParseEnumerable(cityIds),
            };

            return(RequestManager.CreateRequestAsync <IEnumerable <BaseObject> >("database.getCitiesById", accessToken, request));
        }
Beispiel #4
0
        public Task <ApiRequest <bool?> > ClearCache(ServiceAccessToken accessToken, string url = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["url"]          = url,
            };

            return(RequestManager.CreateRequestAsync <bool?>("pages.clearCache", accessToken, request));
        }
Beispiel #5
0
        public Task <ApiRequest <LeadsMetricHitResponse> > MetricHit(ServiceAccessToken accessToken, string data = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["data"]         = data,
            };

            return(RequestManager.CreateRequestAsync <LeadsMetricHitResponse>("leads.metricHit", accessToken, request));
        }
Beispiel #6
0
        public Task <ApiRequest <bool?> > DeleteFromLastShortened(ServiceAccessToken accessToken, string key = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["key"]          = key,
            };

            return(RequestManager.CreateRequestAsync <bool?>("utils.deleteFromLastShortened", accessToken, request));
        }
Beispiel #7
0
        public Task <ApiRequest <UtilsLinkChecked> > CheckLink(ServiceAccessToken accessToken, string url = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["url"]          = url,
            };

            return(RequestManager.CreateRequestAsync <UtilsLinkChecked>("utils.checkLink", accessToken, request));
        }
Beispiel #8
0
        public Task <ApiRequest <UtilsDomainResolved> > ResolveScreenName(ServiceAccessToken accessToken, string screenName = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["screen_name"]  = screenName,
            };

            return(RequestManager.CreateRequestAsync <UtilsDomainResolved>("utils.resolveScreenName", accessToken, request));
        }
Beispiel #9
0
        public Task <ApiRequest <IEnumerable <SecureLevel> > > GetUserLevel(ServiceAccessToken accessToken, IEnumerable <int?> userIds = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["user_ids"]     = RequestHelpers.ParseEnumerable(userIds),
            };

            return(RequestManager.CreateRequestAsync <IEnumerable <SecureLevel> >("secure.getUserLevel", accessToken, request));
        }
Beispiel #10
0
        public Task <ApiRequest <UtilsShortLink> > GetShortLink(ServiceAccessToken accessToken, string url = null, bool? @private = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["url"]          = url,
                ["private"]      = RequestHelpers.ParseBoolean(@private),
            };

            return(RequestManager.CreateRequestAsync <UtilsShortLink>("utils.getShortLink", accessToken, request));
        }
Beispiel #11
0
        public Task <ApiRequest <AuthRestoreResponse> > Restore(ServiceAccessToken accessToken, string phone = null, string lastName = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["phone"]        = phone,
                ["last_name"]    = lastName,
            };

            return(RequestManager.CreateRequestAsync <AuthRestoreResponse>("auth.restore", accessToken, request));
        }
Beispiel #12
0
        public Task <ApiRequest <bool?> > SendSMSNotification(ServiceAccessToken accessToken, int?userId = null, string message = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["user_id"]      = userId?.ToString(),
                ["message"]      = message,
            };

            return(RequestManager.CreateRequestAsync <bool?>("secure.sendSMSNotification", accessToken, request));
        }
Beispiel #13
0
        public Task <ApiRequest <LeadsStart> > Start(ServiceAccessToken accessToken, int?leadId = null, string secret = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["lead_id"]      = leadId?.ToString(),
                ["secret"]       = secret,
            };

            return(RequestManager.CreateRequestAsync <LeadsStart>("leads.start", accessToken, request));
        }
Beispiel #14
0
        public Task <ApiRequest <IEnumerable <PhotosPhoto> > > GetById(ServiceAccessToken accessToken, IEnumerable <string> photos = null, bool?photoSizes = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["photos"]       = RequestHelpers.ParseEnumerable(photos),
                ["photo_sizes"]  = RequestHelpers.ParseBoolean(photoSizes),
            };

            return(RequestManager.CreateRequestAsync <IEnumerable <PhotosPhoto> >("photos.getById", accessToken, request));
        }
Beispiel #15
0
        public Task <ApiRequest <IEnumerable <WallWallpostFull> > > GetById(ServiceAccessToken accessToken, IEnumerable <string> posts, int?copyHistoryDepth, IEnumerable <string> fields)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"]       = accessToken?.Value,
                ["posts"]              = RequestHelpers.ParseEnumerable(posts),
                ["copy_history_depth"] = copyHistoryDepth?.ToString(),
                ["fields"]             = RequestHelpers.ParseEnumerable(fields),
            };

            return(RequestManager.CreateRequestAsync <IEnumerable <WallWallpostFull> >("wall.getById", accessToken, request));
        }
Beispiel #16
0
        public Task <ApiRequest <LeadsComplete> > Complete(ServiceAccessToken accessToken, string vkSid = null, string secret = null, string comment = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["vk_sid"]       = vkSid,
                ["secret"]       = secret,
                ["comment"]      = comment,
            };

            return(RequestManager.CreateRequestAsync <LeadsComplete>("leads.complete", accessToken, request));
        }
Beispiel #17
0
        public Task <ApiRequest <DatabaseGetChairsResponse> > GetChairs(ServiceAccessToken accessToken, int?facultyId = null, int?offset = null, int?count = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["faculty_id"]   = facultyId?.ToString(),
                ["offset"]       = offset?.ToString(),
                ["count"]        = count?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <DatabaseGetChairsResponse>("database.getChairs", accessToken, request));
        }
Beispiel #18
0
        public Task <ApiRequest <bool?> > SetUserLevel(ServiceAccessToken accessToken, IEnumerable <string> levels = null, int?userId = null, int?level = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["levels"]       = RequestHelpers.ParseEnumerable(levels),
                ["user_id"]      = userId?.ToString(),
                ["level"]        = level?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <bool?>("secure.setUserLevel", accessToken, request));
        }
Beispiel #19
0
        public Task <ApiRequest <bool?> > SetCounter(ServiceAccessToken accessToken, IEnumerable <string> counters = null, int?userId = null, int?counter = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["counters"]     = RequestHelpers.ParseEnumerable(counters),
                ["user_id"]      = userId?.ToString(),
                ["counter"]      = counter?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <bool?>("secure.setCounter", accessToken, request));
        }
Beispiel #20
0
        public Task <ApiRequest <IEnumerable <UsersUserXtrCounters> > > Get(ServiceAccessToken accessToken, IEnumerable <string> userIds = null, IEnumerable <string> fields = null, string nameCase = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["user_ids"]     = RequestHelpers.ParseEnumerable(userIds),
                ["fields"]       = RequestHelpers.ParseEnumerable(fields),
                ["name_case"]    = nameCase,
            };

            return(RequestManager.CreateRequestAsync <IEnumerable <UsersUserXtrCounters> >("users.get", accessToken, request));
        }
Beispiel #21
0
        public Task <ApiRequest <IEnumerable <int?> > > SendNotification(ServiceAccessToken accessToken, IEnumerable <int?> userIds = null, int?userId = null, string message = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["user_ids"]     = RequestHelpers.ParseEnumerable(userIds),
                ["user_id"]      = userId?.ToString(),
                ["message"]      = message,
            };

            return(RequestManager.CreateRequestAsync <IEnumerable <int?> >("secure.sendNotification", accessToken, request));
        }
Beispiel #22
0
        public Task <ApiRequest <VideoGetCatalogSectionResponse> > GetCatalogSection(ServiceAccessToken accessToken, string sectionId = null, string from = null, int?count = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["section_id"]   = sectionId,
                ["from"]         = from,
                ["count"]        = count?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <VideoGetCatalogSectionResponse>("video.getCatalogSection", accessToken, request));
        }
Beispiel #23
0
        public Task <ApiRequest <UtilsLinkStats> > GetLinkStats(ServiceAccessToken accessToken, string key = null, string accessKey = null, string interval = null, int?intervalsCount = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"]    = accessToken?.Value,
                ["key"]             = key,
                ["access_key"]      = accessKey,
                ["interval"]        = interval,
                ["intervals_count"] = intervalsCount?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <UtilsLinkStats>("utils.getLinkStats", accessToken, request));
        }
Beispiel #24
0
        public Task <ApiRequest <WidgetsGetPagesResponse> > GetPages(ServiceAccessToken accessToken, int?widgetApiId = null, string order = null, string period = null, int?count = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"]  = accessToken?.Value,
                ["widget_api_id"] = widgetApiId?.ToString(),
                ["order"]         = order,
                ["period"]        = period,
                ["count"]         = count?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <WidgetsGetPagesResponse>("widgets.getPages", accessToken, request));
        }
Beispiel #25
0
        public Task <ApiRequest <WallGetByIdExtendedResponse> > GetByIdExtended(ServiceAccessToken accessToken, IEnumerable <string> posts, bool?extended, int?copyHistoryDepth, IEnumerable <string> fields)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"]       = accessToken?.Value,
                ["posts"]              = RequestHelpers.ParseEnumerable(posts),
                ["extended"]           = RequestHelpers.ParseBoolean(extended),
                ["copy_history_depth"] = copyHistoryDepth?.ToString(),
                ["fields"]             = RequestHelpers.ParseEnumerable(fields),
            };

            return(RequestManager.CreateRequestAsync <WallGetByIdExtendedResponse>("wall.getById", accessToken, request));
        }
Beispiel #26
0
        public Task <ApiRequest <VideoGetCatalogResponse> > GetCatalog(ServiceAccessToken accessToken, int?count = null, int?itemsCount = null, string from = null, IEnumerable <string> filters = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["count"]        = count?.ToString(),
                ["items_count"]  = itemsCount?.ToString(),
                ["from"]         = from,
                ["filters"]      = RequestHelpers.ParseEnumerable(filters),
            };

            return(RequestManager.CreateRequestAsync <VideoGetCatalogResponse>("video.getCatalog", accessToken, request));
        }
Beispiel #27
0
        public Task <ApiRequest <WallGetRepostsResponse> > GetReposts(ServiceAccessToken accessToken, int?ownerId, int?postId, int?offset, int?count)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["owner_id"]     = ownerId?.ToString(),
                ["post_id"]      = postId?.ToString(),
                ["offset"]       = offset?.ToString(),
                ["count"]        = count?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <WallGetRepostsResponse>("wall.getReposts", accessToken, request));
        }
Beispiel #28
0
        public Task <ApiRequest <UsersGetSubscriptionsResponse> > GetSubscriptions(ServiceAccessToken accessToken, int?userId = null, int?offset = null, int?count = null, IEnumerable <string> fields = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["user_id"]      = userId?.ToString(),
                ["offset"]       = offset?.ToString(),
                ["count"]        = count?.ToString(),
                ["fields"]       = RequestHelpers.ParseEnumerable(fields),
            };

            return(RequestManager.CreateRequestAsync <UsersGetSubscriptionsResponse>("users.getSubscriptions", accessToken, request));
        }
Beispiel #29
0
        public Task <ApiRequest <bool?> > CheckPhone(ServiceAccessToken accessToken, string phone = null, int?clientId = null, string clientSecret = null, bool?authByPhone = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"]  = accessToken?.Value,
                ["phone"]         = phone,
                ["client_id"]     = clientId?.ToString(),
                ["client_secret"] = clientSecret,
                ["auth_by_phone"] = RequestHelpers.ParseBoolean(authByPhone),
            };

            return(RequestManager.CreateRequestAsync <bool?>("auth.checkPhone", accessToken, request));
        }
Beispiel #30
0
        public Task <ApiRequest <DatabaseGetCountriesResponse> > GetCountries(ServiceAccessToken accessToken, bool?needAll = null, string code = null, int?offset = null, int?count = null)
        {
            var request = new Dictionary <string, string>
            {
                ["access_token"] = accessToken?.Value,
                ["need_all"]     = RequestHelpers.ParseBoolean(needAll),
                ["code"]         = code,
                ["offset"]       = offset?.ToString(),
                ["count"]        = count?.ToString(),
            };

            return(RequestManager.CreateRequestAsync <DatabaseGetCountriesResponse>("database.getCountries", accessToken, request));
        }