dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.93k stars 1.14k forks source link

Terrible documentation #1506

Open timothyjohnsonjunior opened 3 years ago

timothyjohnsonjunior commented 3 years ago

Why documentation is so poor?

Links from main readme.md don't working https://github.com/dilame/instagram-private-api/blob/master/docs/classes/_repositories_consentrepository.consentrepository.md

More examples

  1. I need to get posts or stories of some user or user pk.
  2. I need to download some user stories by url or dash link How to find necessary information here? Please show me the steps to find solution in the source code or documentation. Better in source code because it is worst documentation I have ever seen
Nerixyz commented 3 years ago

Links from main readme.md don't working

This is a known issue (#1498)

I need to get posts or stories

"postS"/"storieS" ➡️ plural ➡️ you want an array ➡️ check the feeds (ig.feed)

I need to download some user stories by url or dash link

In the response there are urls to the content. Keep in mind that this library only does the requests and doesn't download any content.

How to find necessary information here? Please show me the steps to find solution in the source code or documentation. Better in source code because it is worst documentation I have ever seen

You're probably using JavaScript. Consider typescript. The code is self documenting as almost all things are typed. You start of with (ig: IgApiClient) and use auto-completion from your editor. Some editors can even do this in JavaScript.

I find myself not needing the documentation as it's provided by my editor through the types and tsdoc.

timothyjohnsonjunior commented 3 years ago

Nerixyz thank you. I am using javascript, but I can use typescript. Typescript shows only correct auto-completion hints instead of javascript.

I know java and python. Following api library very different from libraries in java or python.

I don't see posts in ig.feed object, but I see example on the main page. But in code or documentation there no any words that items method returns posts.

  const userFeed = ig.feed.user(loggedInUser.pk);
  const myPostsFirstPage = await userFeed.items()

How to get stories? What type of myPostsFirstPage object (I see in code UserFeedResponseItemsItem, but maybe it can something more than store values)? Many of these methods working without passing pk value to it. As I understand it requesting to logged account.

Next example. We have fbsearch | FbsearchRepository on the main page. What if fbsearch? Facebook search? Where to find documentation in two words about every module or class?