Skip to content

Commit

Permalink
Update documentation and add endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
kiliczsh committed Apr 22, 2023
1 parent 815de1f commit 599867a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ List of Implemented API Calls:
- `getFollows(handle=None, user_did=None, limit=10, cursor="")`
- `listNotifications(limit=10, cursor="")`
- `updateSeen(limit=10, cursor="")`

- `getTimeline(limit=10, cursor="", algorithm="reverse-chronological")`

### Development

Expand Down
51 changes: 41 additions & 10 deletions gokyuzu/BlueskyEndpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,66 @@ def __init__(self, BSKY_SERVER):
def get_url(self, path):
return self.BSKY_SERVER + path

# com.atproto.server
def createAccount(self):
return self.get_url("/xrpc/com.atproto.server.createAccount")

def createSession(self):
return self.get_url("/xrpc/com.atproto.server.createSession")

def resolveHandle(self):
return self.get_url("/xrpc/com.atproto.identity.resolveHandle")
def getSession(self):
return self.get_url("/xrpc/com.atproto.server.getSession")

def getAccountInviteCodes(self):
return self.get_url("/xrpc/com.atproto.server.getAccountInviteCodes")

# app.bsky.actor
def getProfile(self):
return self.get_url("/xrpc/app.bsky.actor.getProfile")

def createRecord(self):
return self.get_url("/xrpc/com.atproto.repo.createRecord")
def getProfiles(self):
return self.get_url("/xrpc/app.bsky.actor.getProfiles")

def deleteRecord(self):
return self.get_url("/xrpc/com.atproto.repo.deleteRecord")
# app.bsky.unspecced
def getPopular(self):
return self.get_url("/xrpc/app.bsky.unspecced.getPopular")

def getAccountInviteCodes(self):
return self.get_url("/xrpc/com.atproto.server.getAccountInviteCodes")
# app.bsky.feed
def getTimeline(self):
return self.get_url("/xrpc/app.bsky.feed.getTimeline")

def getAuthorFeed(self):
return self.get_url("/xrpc/app.bsky.feed.getAuthorFeed")

def getPostThread(self):
return self.get_url("/xrpc/app.bsky.feed.getPostThread")

# app.bsky.graph
def getFollowers(self):
return self.get_url("/xrpc/app.bsky.graph.getFollowers")

def getFollows(self):
return self.get_url("/xrpc/app.bsky.graph.getFollows")

# app.bsky.notification
def listNotifications(self):
return self.get_url("/xrpc/app.bsky.notification.listNotifications")

def updateSeen(self):
return self.get_url("/xrpc/app.bsky.notification.updateSeen")

def getTimeline(self):
return self.get_url("/xrpc/app.bsky.feed.getTimeline")
# com.atproto.repo
def createRecord(self):
return self.get_url("/xrpc/com.atproto.repo.createRecord")

def deleteRecord(self):
return self.get_url("/xrpc/com.atproto.repo.deleteRecord")

# com.atproto.identity
def resolveHandle(self):
return self.get_url("/xrpc/com.atproto.identity.resolveHandle")

def updateHandle(self):
return self.get_url("/xrpc/com.atproto.identity.updateHandle")


2 changes: 0 additions & 2 deletions gokyuzu/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

import json
from gokyuzu.BlueskyEndpoints import BlueskyEndpoints
from gokyuzu.BlueskyHelper import BlueskyHelper
from gokyuzu.BlueskySession import BlueskySession
Expand Down

0 comments on commit 599867a

Please sign in to comment.