Git Product home page Git Product logo

bsky-docs's Introduction

bsky-docs

This repository contains developer documentation for the Bluesky API (api.bsky.app), which is available to read at docs.bsky.app.

The atproto.com website, including the AT Protocol specifications, is versioned separately at https://github.com/bluesky-social/atproto-website.

Docs Development

This website is built using Docusaurus, a modern static website generator.

For live-reloading development:

  1. Clone this repo
  2. Run npm install
  3. Run the development server with npm start
  4. Open http://localhost:3000 with your browser.

To output a build:

  • run npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

Generate OpenAPI to Docusaurus MDX

We use a forked version of atproto-openapi-types to generate an OpenAPI schema from atproto lexicons. We use the docusaurus-openapi-docs plugin.

To generate OpenAPI types from atproto lexicons:

  1. Run deno task run to generate a fresh OpenAPI spec to atproto-openapi-types/spec/api.json.
  2. Run npx docusaurus-mdx-checker to see MDX compatibility.
  3. Run npm run docusaurus gen-api-docs <id> to generate MDX docs from an OpenAPI spec. In this case, npm run docusaurus gen-api-docs bskyApi.

If you want to regenerate MDX docs from an updated api.json file, run npm run clear-and-gen-api-docs. This command clears the existing docs and replaces them with freshly generated docs.

The OpenAPI docs auto-update with the latest lexicon changes once a day.

Are you a developer interested in building on atproto?

Bluesky is an open social network built on the AT Protocol, a flexible technology that will never lock developers out of the ecosystems that they help build. With atproto, third-party can be as seamless as first-party through custom feeds, federated services, clients, and more.

If you're a developer interested in building on atproto, we'd love to email you a Bluesky invite code. Simply share your GitHub (or similar) profile with us via this form.

License

Documentation text is under Creative Commons Attribution (CC-BY).

Inline code examples, example data, and regular expressions are under Creative Commons Zero (CC-0, aka Public Domain) and copy/pasted without attribution.

Please see LICENSE.txt with reminders about derivative works, and LICENSE-CC-BY.txt for a copy of license legal text.

bsky-docs's People

Contributors

amazingca avatar ameliamnesia avatar awinterman avatar bnewbold avatar danrusei avatar dholms avatar easychen avatar emilyliu7321 avatar enerrio avatar estrattonbailey avatar gargaj avatar huuto avatar juni-b-queer avatar marcomaroni-github avatar marshalx avatar mary-ext avatar mbanusic avatar mfnboer avatar mozzius avatar mszpro avatar pdelfan avatar petrikaj avatar pfrazee avatar pixelasticity avatar rdp-studio avatar seboslaw avatar snarfed avatar surfdude29 avatar tatsuyayamamoto avatar whyrusleeping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsky-docs's Issues

API Playground has the lexicon name omitted

When going into the API reference pages, the API playground omits the lexicon name. To be more specific, instead of seeing (for example) https://bsky.social/xrpc/app.bsky.feed.getPostThread, you instead see https://bsky.social/xrpc.

Below is a video showcasing this issue:

Screen.Recording.2024-03-05.at.10.10.16.PM_720.mov

Because of this, attempting to test any APIs would lead to 404 errors.

(My apologies for the weird lines in the video: I'm not too sure why it's doing that.)

add basic CI for build

The "MDX" files frequently fail to build due to syntax errors. Would be good to have a basic CI which would try to build the existing files, if not additionally do other API auto-docs compilation.

no record schema in the docs

Since there is no type definition for record in the API reference, important usage of the API is unclear.
In particular, there is a concern that developers who do not use the official SDK will not be able to find a way to follow or like.

Document read-only endpoints that don't require auth

We need to:

  • Make it clear how obtain a bearer token (the docs are currently vague about this)
  • Split APIs into read-only and requiring auth. Make that distinction clear. Possibly even with icons in the sidebar
  • Integrate this information into the runnable HTTP widget. Make it easy to get bearer token right there for any API call or, for publicly available APIs, not require it at all
  • Make sure the instructions and code snippets for any public API don't force you to enter the token. Just like our PWI is able to access those endpoints without logging in

Missing Showcase submission instructions

When I went to the showcase page and clicked the "Submit your project here" there were no instructions or best practices to follow. I went through previous PRs that added items to the showcase and figured it so I just submitted my first showcase project #121!

I'm not saying it needs a detailed walk through, but any mention of submissions in the Readme would be nice if that's where the submission link directs to.
Questions that would be helpful to know

  • Where are the submissions located? (src/data/users.tsx)
  • Where should I put my submission? Is there any order, or just at the end? (I just assumed the end)
  • Where should I put the image?
  • What are the image requirements/limitations?
  • What are the qualifiers for each of the tags?
  • What needs to be included in the submission object?
  • What should the PR look like?

This added documentation could be as simple as

Submitting to the Community Showcase

  1. Fork the bsky-docs repo
  2. In src/data/users.tsx, add your submission with {include required info}
  3. (Optional) Add photo to src/data/showcase/ {include image requirements/limitations}
  4. Commit changes to a branch in your fork
  5. Make a PR to merge your branch into the main bsky-docs {include what's needed in the PR}
  6. Done! (?)

I'm also more than happy to make a PR to add this, but I don't have the answers to all of the questions right now.

code/API example sidebars (right column) does not update with actual API endpoint info

The curl, python, etc code examples on the right are somehow not updated with the actual endpoint being viewed. The URL is always just a base URL (doesn't include the path), the requests are always GET (even for POST endpoints), and no body or query params are included.

I spent an hour or two poking around and can't figure out why this isn't happening. There are just a ton of layers of abstractions/plugins/packages and i'm not familiar with MDX/React to debug this myself.

Clarification on "Severity: warning" vs "Severity: alert"

severity is introduced as being one of "alert, inform, or none" but in the "Custom label values" table and examples I see "warning, alert, inform, or none"

Just curious if "alert" was formerly called "warning" and the docs need to be updated or if I'm misunderstanding something on how labels work.

Add sandboxes to Get Started

I propose a little rework on the https://www.docs.bsky.app/docs/get-started page:

  • Let's show a read-only example first. E.g. showing a list of someone's posts. This is to demonstrate how easy it is to get started, and that you don't need a "developer account" or an "API key" or all the stuff that's usually necessary to hit an API.
  • Let's make this example runnable directly on the page. E.g. via StackBlitz. I'm obviously biased but I think a React example like https://www.docs.bsky.app/docs/starter-templates/clients would be nice (except runnable and showing a list of posts rather than a list of feeds).
  • Then let's move the part that requires authentication (posting) down the page a bit. So that it comes after the read-only example. Could be an extension to the first example. (E.g. the example switches to showing own posts -> and then shows how you can add a new one.)

So by the end of the page you kind of see a minimal workable client.

doc examples are updated every day

The current daily automation seems to re-generate examples using the current day as the datetime/timestamp, resulting in a lot of git history churn.

agent.getTimeline default sample gives 500 error

Hi

(For starter user ) I detect the following issue

the sample provided here is really confusing
https://github.com/bluesky-social/bsky-docs/blob/main/docs/tutorials/viewing-feeds.mdx?plain=1#L39

is

const { data } = await agent.getTimeline({
  cursor: "...",
  limit: 30,
});

If I keep the example provided, it generates 500 error (expect 4xx)
⚠️ there is most definitely a bug to create for the backend side, if anyone can create it, or tell me where to create it. This contributes to the resolution of this ticket (having a linked issue created)

and according to the doc, cursor default is empty.
So if I replace "..." by "" ; then I got no issue.

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.