コード例 #1
0
ファイル: VkApi.cs プロジェクト: nkomarov/VKSharp
		public async Task<EntityList<Photo>> PhotosGetAsync(
			 SpecialAlbum albumId ,
			 int? ownerId = null,
			 int[] photoIds = null,
			 bool rev = true,
			 bool extended = false,
			 FeedType? feedType = null,
			 uint? feed = null,
			 uint offset = 0,
			 uint count = 100
			){
			return (await Executor.ExecAsync(
				_reqapi.PhotosGet(
											albumId,
											ownerId,
											photoIds,
											rev,
											extended,
											feedType,
											feed,
											offset,
											count
									)
			)).Data.FirstOrDefault();
		}
コード例 #2
0
ファイル: RequestApi1.cs プロジェクト: nkomarov/VKSharp
		public VKRequest<EntityList<Photo>> PhotosGet(
			 SpecialAlbum albumId ,
			 int? ownerId = null,
			 int[] photoIds = null,
			 bool rev = true,
			 bool extended = false,
			 FeedType? feedType = null,
			 uint? feed = null,
			 uint offset = 0,
			 uint count = 100
			){
			var req = new VKRequest<EntityList<Photo>>{
				MethodName = "photos.get",
				Parameters = new Dictionary<string, string> {
					{ "album_id", albumId.ToNClString() },
			{ "owner_id", MiscTools.NullableString(ownerId) },
			{ "photo_ids", (photoIds??new int[]{}).ToNCStringA() },
			{ "rev", (rev?1:0).ToNCString() },
			{ "extended", (extended?1:0).ToNCString() },
			{ "feed_type", MiscTools.NullableString( feedType ) },
			{ "feed", MiscTools.NullableString(feed) },
			{ "offset", offset.ToNCString() },
			{ "count", count.ToNCString() }
				}
			};
			if (IsLogged){
				req.Token = CurrentToken;
			}
			return req;
		}
コード例 #3
0
ファイル: Api.cs プロジェクト: kasthack/kasthack.vksharp
 public async Task <EntityList<Photo>> Get(
     SpecialAlbum albumId , int? ownerId = null, int[] photoIds = null, bool rev = true, bool extended = false, FeedType? feedType = null,  int? feed = null, int? offset = null, int? count = 100
 ) {
     return (
         await _parent.Executor.ExecAsync(
             _parent._reqapi.Photos.Get(
                 albumId,ownerId,photoIds,rev,extended,feedType,feed,offset, count
             )
         ).ConfigureAwait(false)
     ).Response;
 }
コード例 #4
0
ファイル: Api.cs プロジェクト: kasthack/kasthack.vksharp
 public EntityList<Photo> GetSync(
     SpecialAlbum albumId , int? ownerId = null, int[] photoIds = null, bool rev = true, bool extended = false, FeedType? feedType = null,  int? feed = null, int? offset = null, int? count = 100
 ) {
     var task = _parent.Executor.ExecAsync(
             _parent._reqapi.Photos.Get(
                 albumId,ownerId,photoIds,rev,extended,feedType,feed,offset, count
             )
         );
     task.Wait();
     return task.Result.Response;
 }
コード例 #5
0
ファイル: RawApi.cs プロジェクト: nkomarov/VKSharp
		public async Task<string> PhotosGetAsync(
			 SpecialAlbum albumId ,
			 int? ownerId = null,
			 int[] photoIds = null,
			 bool rev = true,
			 bool extended = false,
			 FeedType? feedType = null,
			 uint? feed = null,
			 uint offset = 0,
			 uint count = 100
			){
			return await Executor.ExecRawAsync(
				_reqapi.PhotosGet(
											albumId,
											ownerId,
											photoIds,
											rev,
											extended,
											feedType,
											feed,
											offset,
											count
									)
			);
		}