19 Matching Annotations
  1. Jul 2023
    1. ```js import { ThreadsAPI } from 'threads-api';

      // or in Deno 🦖: // import { ThreadsAPI } from "npm:threads-api";

      const main = async () => { const threadsAPI = new ThreadsAPI();

      const username = '_junhoyeo'; const id = await threadsAPI.getUserIDfromUsername(username); console.log(id);

      if (!id) { return; }

      const user = await threadsAPI.getUserProfile(username, id); console.log(JSON.stringify(user));

      const posts = await threadsAPI.getUserProfileThreads(username, id); console.log(JSON.stringify(posts));

      const replies await threadsAPI.getUserProfileReplies(username, id); console.log(JSON.stringify(replies)); }; main(); ```

  2. Nov 2022
  3. Oct 2022
  4. Aug 2022
  5. Jun 2022
    1. The creator of GraphQL admits this. During his presentation on the library at a Facebook internal conference, an audience member asked him about the difference between GraphQL and SOAP. His response: SOAP requires XML. GraphQL defaults to JSON—though you can use XML.
    2. Conclusion There are decades of history and a broad cast of characters behind the web requests you know and love—as well as the ones that you might have never heard of. Information first traveled across the internet in 1969, followed by a lot of research in the ’70s, then private networks in the ’80s, then public networks in the ’90s. We got CORBA in 1991, followed by SOAP in 1999, followed by REST around 2003. GraphQL reimagined SOAP, but with JSON, around 2015. This all sounds like a history class fact sheet, but it’s valuable context for building our own web apps.
  6. May 2022
  7. Jan 2022
  8. Nov 2021
    1. Feature GraphQL REST

      GraphQL vs *REST (table)

    2. There are advantages and disadvantages to both systems, and both have their use in modern API development. However, GraphQL was developed to combat some perceived weaknesses with the REST system, and to create a more efficient, client-driven API.

      List of differences between REST and GraphQL (below this annotation)

  9. Jun 2021
  10. Oct 2020
  11. May 2020
  12. Nov 2019
    1. REST and GraphQL are wonderful tools to create an API that is meant to be consumed by third parties. Facebook's API, for example, is consumed by ~200k third parties. It is no surprise that Facebook is using (and invented) GraphQL; a GraphQL API enables third parties to extensively access Facebook's social graph enabling them to build all kinds of applications. For an API with that many consumers, GraphQL is the fitting tool. But, to create an internal API (an API developed and consumed by code written by the same organization), RPC offers a simpler and more powerful alternative. Large companies, such as Netflix, Google and Facebook, are starting to replace REST/GraphQL with RPC for their internal APIs. Most notably with gRPC which is getting popular in the industry.
  13. Oct 2018