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 DP v1 user follows & track/playlist repost/saves #875

Merged
merged 7 commits into from
Oct 2, 2020

Conversation

jowlee
Copy link
Contributor

@jowlee jowlee commented Oct 1, 2020

Trello Card Link

https://www.notion.so/audiusproject/Porting-Client-to-API-9beefcc007ff4242be96124874606227
Item: /users//following & /users//followers

Description

Add user following and follows endpoint to the DP v1 full api with caching

Services

Discovery Provider

Does it touch a critical flow like Discovery indexing, Creator Node track upload, Creator Node gateway, or Creator Node file system?

Delete an option.

  • ✅ Nope

How Has This Been Tested?

I ran it locally against the prod snapshot db and compared the query results to the results of the non-v1 api endpoint to check that the fields matched and that the correct users were returned.



def get_savers_for_track(save_track_id):
def get_savers_for_track(args):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Michael and I did current_user_id as a separate arg to the fn. Do you like combining that into args instead? Can do that. Let's just be consistent

@@ -1063,6 +1063,14 @@ def paginate_query(query_obj, apply_offset=True, include_count=False):
return (modified_query, query_obj.count())
return modified_query

def add_query_pagination(query_obj, limit, offset, apply_offset=True, include_count=False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach much better. Having methods pull off of the request object makes refactoring pretty hard

@jowlee jowlee changed the title Jowlee users follow Add DP v1 user follows & track/playlist repost/saves Oct 2, 2020
@jowlee jowlee merged commit dad9683 into master Oct 2, 2020
@jowlee jowlee deleted the jowlee-users-follow branch October 2, 2020 18:27
@jowlee jowlee mentioned this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants