-
Notifications
You must be signed in to change notification settings - Fork 9
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 notes functionality #138
Merged
Merged
Conversation
This file contains 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
c28d0ac
to
33bac0d
Compare
All attributes were set to zero. Oops.
The URL parameter `field[blogs]` allows us to customize what fields are returned by Tumblr in regards to blog information. However, in an effort to mimic the official clients we use the exact same `field[blogs]`as official requests. Thus when Tumblr sets `field[blogs]` to something that doesn't return everything we require the typical parsing fails. As a workaround this commit adds the new method `parse_limited` as to handle the special edge case when `field[blogs]` doesn't contain all of the fields we need. The logic is separated because of the fact that this is a special case only seen in the requests for notes. In all other requests the `field[blogs]` attribute is set to return everything we need instead of only the name, avatar and theming information.
When blog[fields] is not specified the `theme` object will still be present except with only one attribute: avatar_shape
Reuses the template for posts for conveniences sake
The return the oldest reblogs by default as well as with a type of reblog_with_comments
Reblog notes should not have the regular footer interaction buttons seen on regular posts
The post url is generated quite a few times in the template due to the need to check whether to include the slug or not. By generating this in the routing logic instead we can increase performance by eliminating the duplicate creations of the post url
post.jinja is used in more places than just the route that renders a single post and in those places a post url isn't generated
Use babel to provide locale specific formattings for the numbers
These attributes are always false as we are fetching the post data without an account In addition due to the way we were locking the counts for the various note types behind these attributes being true The fact that they are always false means that we never actually parse the counts for the note types
33bac0d
to
465efd0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.