コード例 #1
0
ファイル: pinboard.py プロジェクト: aventurella/linkbot
    def get_links_with_tag(self, tag):
        posts = self.pinboard.posts(tag=tag)
        collection = []

        for post in posts:
            link = Link()
            link.url = post['href']
            link.description = post['description']
            link.tags = post['tags']
            collection.append(link)

        return collection
コード例 #2
0
ファイル: pinboard.py プロジェクト: aventurella/linkbot
    def recent(self, count=5):
        posts = self.pinboard.posts(count=count)
        collection = []

        for post in posts:
            link = Link()
            link.url = post['href']
            link.description = post['description']
            link.tags = post['tags']
            collection.append(link)
        
        return collection