Skip to content

API docs: add APITweet.media.all, APIPhoto.altText #507

Open

Description

@Deer-Spangle

Hey there,

Just noticed both of these are missing from the api docs on the wiki:
https://github.com/FixTweet/FixTweet/wiki/Status-Fetch-API

I guess APITweet's media.all is just the list of all media? Combining both photos and videos, in case they have order.
But does it include the website previews? I would guess not? But I didn't manage to find an example in a quick delve into that place.

And I noticed altText isn't listed on there for APIPhoto either. And a lot of fields are missing from APIAuthor

I'm not sure whether anything else is missing, though I was wondering what the heck is up with that created_at format? Is that some standard American format? I would have expected ISO8601, but I think I can work with whatever.

Also, curious what the API reports for gifs, which are a separate media type in the twitter API, iirc? I'm not sure if those still exist, and couldn't find an example with a quick glance!

Many thanks once again!

Activity

  1. dangeredwolf commented on Nov 22, 2023

    @dangeredwolf
    Member

    created_at uses js date formatting which comes directly from Twitter API. I'm still working on v2 of API which also includes threads and other data providers <.<

  2. added
    documentation
    API
    on Nov 22, 2023
  3. Deer-Spangle commented on Nov 22, 2023

    @Deer-Spangle
    ContributorAuthor

    Is it JS date formatting? When I try in console, JS puts the year before the time, but the API seems to put it afterwards?

    >>> d = new Date()
    Date Wed Nov 22 2023 13:29:46 GMT+0000 (Greenwich Mean Time)
    >>> d.toString()
    "Wed Nov 22 2023 13:29:46 GMT+0000 (Greenwich Mean Time)"
    >>> d.toGMTString()
    "Wed, 22 Nov 2023 13:29:46 GMT"
    >>> d.toISOString()
    "2023-11-22T13:29:46.571Z" 
    

    Where the API gives something like Wed Nov 22 13:29:46 +0000 2023
    But yeah, fair enough, it's whatever. I can handle that. (For v2 reference, please return timestamps in ISO8601 format!)

    Searched and found a twitter gif, and looks like the API supports it as an mp4 and lists in videos, as expected:
    https://api.fxtwitter.com/AMUMA_amuma/status/1727282721276514331
    cool

    So yeah, remaining question to clarify: APITweet's media.all is just the list of all media in order right, in case there's a mix of photos and videos?

    I tried to delve in and find an example tweet, but didn't succeed.
    Did find whatever this is, which displays on twitter as an image, but is a link to instagram? But doesn't include the link in the visible text... but then the fxtwitter API includes the link in the text, doesn't have a media key at all, would have expected empty or media.external
    https://api.fxtwitter.com/PrinceMixedMazi/status/1724874359662403995

    Also, what do you mean by other data providers?

  4. dangeredwolf commented on Dec 13, 2023

    @dangeredwolf
    Member

    By other data providers I meant Mastodon (activitypub) and Bluesky. And yes, media.all is mixed videos and photos

  5. manhict commented on Dec 26, 2023

    @manhict

    I see a note to read non-public urls like Nsfw, can this be done without an account cookie?

    For example: When I try running that with the api at:
    https://api.fxtwitter.com/status/1663282281488760834 ["code": 200,"message": "OK",]

    http://localhost:8787/status/1663282281488760834 ["code": 404,"message": "NOT_FOUND","tweet": null]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions