Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GiveawayGrabber.Models;
- using GiveawayGrabber.ViewModels;
- namespace GiveawayGrabber.Logic
- {
- public interface IGiveawaySite
- {
- /// <summary>
- /// Describing name of the website.
- /// </summary>
- string Name { get; }
- /// <summary>
- /// Url of the website's homepage.
- /// </summary>
- string Url { get; }
- GiveawayViewModel GiveawayViewModel { get; set; }
- /// <summary>
- /// Retrieve all the won giveaways that have not yet been confirmed (i.e. that still need to be activated).
- /// </summary>
- /// <returns>Array of all the unconfirmed giveaways wins.</returns>
- GiveawayModel[] Wins();
- GiveawayModel[] Giveaways();
- /// <summary>
- /// Check to determine whether or not the given giveaway should be entered or not.
- /// </summary>
- /// <param name="model">Giveaway that should be entered or not.</param>
- /// <returns>True if the gift can be entered, false otherwise.</returns>
- bool CanEnter(GiveawayModel model);
- /// <summary>
- /// Enter the given giveaway on the website.
- /// </summary>
- /// <param name="model">Giveaway to enter.</param>
- /// <returns>True if the giveaway was successfully entered, false otherwise.</returns>
- bool Enter(GiveawayModel model);
- /// <summary>
- /// Reload all the GiveawaySite's properties by sending a new request to the website and parsing the received response.
- /// </summary>
- void Refresh();
- /// <summary>
- /// Update the GiveawaySite's properties by parsing the content of the given document string.
- /// </summary>
- /// <param name="document">Document string of the web response.</param>
- /// <param name="page">String description of the source page. Can be used in cases where certain information can only be parsed from certain sites.</param>
- void ParseResponse(string document, string page = "");
- /// <summary>
- /// Call the GiveawaySite's sync functionality online.
- /// </summary>
- /// <returns>True is the online sync functionality was successfully called, false otherwise.</returns>
- bool Sync();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement