ianklatzco / atprototools

easy-to-use and ergonomic library for interacting with bluesky
MIT License
62 stars 11 forks source link

Additional Features #9

Open ImFaisalKhalid opened 1 year ago

ImFaisalKhalid commented 1 year ago

Hey Ian,

You asked me to file an issue asking for TODOs - do you have anything in mind?

MostWrong commented 1 year ago

@ianklatzco

ianklatzco commented 1 year ago

i've added some more issues ^^

i think it would be cool if this were a full-featured client!

ianklatzco commented 1 year ago

what precisely does that mean?

A cleaner API would look like something like:

class BskyResponse():
    # blah blah blah
    def __init__():
        self.response = None

def resolveHandle(self, username0:
    headers = #blahblahblah
    resp = requests.get(blahblahbla)
    rrrr = BskyResponse()
    rrrr.response = resp

It would also be cool if there were a decorator in front of each def that made it so we didn't need to put headers in every function manually.

ShreyanJain9 commented 1 year ago

I don't know if this fits what you're thinking, but @thearchduke was able to write a codegen script from the Lexicons in the ATProto repository to generate Ruby classes for each Lexicon. Something similar could probably work in Python

https://github.com/ShreyanJain9/bskyrb/blob/main/lib/bskyrb/codegen.rb

thearchduke commented 1 year ago

something like this? https://github.com/jbn/psychonaut/blob/main/psychonaut/lexicon/codegen.py

ianklatzco commented 1 year ago

yeah! psychonaut's approach is super cool (codegen). i think it would be super cool / instructive / good learning to do that here too.