Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the missing reblog info fields to Post #80

Merged
merged 1 commit into from
Jan 8, 2016

Conversation

KevinTCoughlin
Copy link
Contributor

Overview

This adds the missing reblog_* fields to Post.java brought up in #76.

Concerns

  • I'm unsure about the JavaDoc accuracy for the new Getters. Also this documentation seems to be missing on https://www.tumblr.com/docs/en/api/v2 cc: @ceyko
  • Add tests? Our testing solution is lacking. I can follow the style that exists in TextPost for example, but I'd like to just inflate a flat JSON file down the road or something.

Example existing test:

        Map<String, Object> flat = new HashMap<String, Object>();
        flat.put("type", "text");
        flat.put("title", title);
        flat.put("body", body);
        flat.put("note_count", noteCount);
        flat.put("reblogged_from_id", rebloggedFromId);
        flat.put("reblogged_from_name", rebloggedFromName);
        Gson gson = new GsonBuilder().registerTypeAdapter(Post.class, new PostDeserializer()).create();
        post = (TextPost) gson.fromJson(flatSerialize(flat), Post.class);

@ceyko
Copy link
Contributor

ceyko commented Dec 1, 2015

Maybe just update the doc for the root varieties to say that they're the data for the root post / root post's blog.

Agree, tests are a bit weak. I'm good either way - adding them or not.

Will update the api docs to reflect these fields.

ericleong added a commit that referenced this pull request Jan 8, 2016
Add the missing reblog info fields to Post
@ericleong ericleong merged commit 68fa791 into tumblr:master Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants