This project aims to provide the functionality to trigger social giveaways (raffle) using different social network APIs.
- Netmentor.DiContainer
- RailwayOrientedProgramming
- Tweetinvi only twitter.
Note: this is still a development version. Things like the token to access the twitter API is not implemented automatically. The configuration can specify it in the appsettings.json
or appsettings.private.json
, which will not get committed in Git.
The entire application is based on Tickets
, those Tickets
are based on Rules
, and all the rules in a Ticket
must fulfil to get that ticket.
In a typical giveaway on Twitter, You may set Retweet + Follow the account to get one "ticket", but you may want to add more interaction like, "add a comment to increase your chances", which translates into another ticket inside the application.
Explanation: 1 Raffle
- Ticket1: Follow + RT (Two rules)
- Ticket2: Comment (One rule)
Any of the users who fulfil any of the tickets will have a chance to win.
Note: the application is still in development, some of the code is done using Tweetinvi, but for me, GetBearerToken
was not working. At the moment, the token has to be specified in the appsettings.json
.
Remember that you will be limited by the Twitter API limitations
If the rule is sent with no condition, the code will check the author of the tweet based on the TweetId
.
[
{
"rules": [
{
"type": "Follow"
}
]
}
]
there is an alternative, which is specifying the accounts to follow based on the @TwitterAccount
:
[
{
"rules":[
{
"type":"Follow",
"conditions":[
{
"subRule":"Follow",
"condition":"Account1"
},
{
"subRule":"Follow",
"condition":"Account2"
}
]
}
]
}
]
By the TweetId gets the likes of a tweet.
Note: Limited to 100 likes due to a Twitter API limitation
- TODO: #3 Update Twitter Like Rule to get more than 100 likes.
Gets the users who replied to a tweet
Inside the comments you can evaluate Hashtags and Mentions. They are threaten as subRule.
It allows you to filter by any hashtag used within the comment.
It allows you to specify who should be mentioned.
- note: the validation is case insensitive
Gets the users who retweeted a tweet
Due to the limitations of the YouTube API the app will support only calls done with the APi Key YouTube Documentation
Gets the comments in a video.
TODO: #7
Please do not hesitate in adding some issues or contribute to the code.
Si te gusta el proyecto no dudes en darle una estrella, hacer un fork junto a una PR o incluso apoyar económicamente el proyecto donando un café.