To track which awesome lists appear on a repository list, you can simply use a set. The Redis SADD command is used to add members to a set stored at the key. SADD commands return the number of elements that were added to the set. This does not include all of the elements already present in the set.
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
SADD resource:github:{owner}:{repo_name}:lists {list} | |
SET resource:github:{owner}:{repo_name} | |
{ | |
'repo_name': resource['name'], | |
'lists': # SMEMBERS resource:github:{owner}:{repo_name}:lists | |
'body': resource['description'], | |
'stargazers_count': resource['stargazers_count'], | |
'language': resource['language'], | |
'svn_url': resource['svn_url'] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment