Created
August 19, 2016 22:52
-
-
Save piedoom/f03e5cf56ef5136899627343347e57a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first, we get a list of all posts | |
BasePost[] inbox = Client.GetSubmissionPostsAsync(TUMBLR_BLOG_NAME); | |
// loop through our inbox | |
foreach (var message in inbox) | |
{ | |
// cast our generic BasePost to an AnswerPost to expose relevant information | |
AnswerPost ask = (AnswerPost)message; | |
// edit our post and publish | |
Client.EditPostAsync( | |
TUMBLR_BLOG_NAME, | |
ask.Id, PostData.CreateAnswer( | |
answer: "my response", | |
tags: new string[0], | |
state: PostCreationStatePublished)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment