Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Returns a random picture of TM
- /// </summary>
- /// <param name="token">User authentification token</param>
- /// <returns>GalleryPicture with filled informations</returns>
- public static GalleryPicture GetRandomPic(string token)
- {
- return GetRandomPic(token, Gender.Empty);
- }
- /// <summary>
- /// Returns a random picture of TM
- /// </summary>
- /// <param name="token">User authentification token</param>
- /// <param name="filter">Specify if just random pics from male or female returns</param>
- /// <returns>GalleryPicture with filled informations</returns>
- public static GalleryPicture GetRandomPic(string token, Gender filter)
- {
- //Fill API Data
- ApiCall call = new ApiCall("getRandomPic");
- call.Parameter.Add("token", token);
- //check for gender
- if (filter != Gender.Empty)
- {
- call.Parameter.Add("gender", filter.ToString());
- }
- call.PostRequest = POSTRequest;
- //Handle Request
- XmlDocument memberdata = CallNativeApiFunction(call);
- return ServiceFunctions.FillGalleryPictureData(memberdata.SelectSingleNode("pic"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement