971 Matching Annotations
  1. Last 7 days
    1. You can filter the resource using criteria specified as query[*]. You can provide multiple criteria, to use AND logic. You can sort the resource using parameters specified as sort[*]. You can specify multiple fields to sort by.
    2. Enum:"add" "delete" An additional flag parameter with the value add will add masks provided in the request body to the list. A flag value delete will delete masks from the list. If there's no parameter provided, masks are replaced.
    1. Dilemma: Do I use this unofficial library with its really nice idiomatic API or the official library (https://github.com/mailgun/mailgun-ruby) with its inferior API?

      I wish this one was still/better maintained because I'd much rather use this API, like: @mailgun.lists.create "devs@your.mailgun.domain" @mailgun.lists.list @mailgun.lists.find "devs@your.mailgun.domain"

      but it's not maintained, and looks like it doesn't have the word events in the source at all, so it's missing any way to use the Events API. :(

    1. Swagger is a tool implementing the Open API specification which defines a standard, language-agnostic interface for describing HTTP-based APIs.
    1. Donations

      To add some other intermediary services:

      To add a service for groups:

      To add a service that enables fans to support the creators directly and anonymously via microdonations or small donations by pre-charging their Coil account to spend on content streaming or tipping the creators' wallets via a layer containing JS script following the Interledger Protocol proposed to W3C:

      If you want to know more, head to Web Monetization or Community or Explainer

      Disclaimer: I am a recipient of a grant from the Interledger Foundation, so there would be a Conflict of Interest if I edited directly. Plus, sharing on Hypothesis allows other users to chime in.

  2. Nov 2022
    1. Clean code examples (YouTube)Why Are You Still Creating CRUD APIs?Remove Your If-Else and Switch CasesWhy Cognitive and Cyclomatic Complexity Matters in Software DevelopmentWriting Cleaner Code (With Examples)Resources for the curious📚 Source Code (GitHub) by Nicklas Millard, the authorRESTful API Design by MicrosoftArchitectural Styles and the Design of Network-based Software Architectures by R.T. FieldingWhat is REST by codeacademyIs Crud Bad For Rest? by Boris LublinskyHATEOAS Driven REST APIs by restfulapi.netHATEOAS — a simple explanation by Bartosz JedrzejewskiWhy HATEOAS is useless and what it means for REST by Andreas ReiserRESTful Considered Harmful by Tomasz NurkiewiczTask-Based UI on cqrs.wordpress.comCRUD is an antipattern by Mathias VerraesWhy REST sucks by Troy A. Griffitts

      Useful links for Web & generic programming.

    2. RPC-like but still REST-full is way more preferred than those rotten CRUD designs.

  3. Oct 2022
    1. How do REST APIs work? REST, or “representational state transfer,” is a type of software design that gives access to data (aka “web resources”) by using a uniform and predefined set of operations. The payload - the data to be delivered - defined in the request itself, will be formatted in a language such as HTML, JSON, or XML. The set of operations are the methods available to HTTP, which is the underlying protocol for how browsers retrieve websites from servers. These methods include GET, POST, PUT, DELETE, and others.

      O que é payload

    2. REST APIs If you’ve heard people talk about JSON (javascript object notation), chances are they’re talking about REST APIs. Over 70% of all public APIs use REST, because of its fast performance, reliability, and ability to scale by reusing modular components without affecting the system as a whole.

      O que é REST API

    1. Communication with this endpoint consists of JSON-encoded messages sent from client to server and vice versa.

      Este é o EndPoint da API do Hypothesis.

    1. Para solicitar a primeira API, crie um URL que aponte para o “endpoint” da API com a qual deseja se comunicar e passe o URL à ação “Obter Conteúdo do URL”. Quando o atalho é executado, essa ação faz a solicitação de API.

      Parece que um EndPoint é a porta de comunicação entre um HTTP API server e seu cliente.

    1. If the common storage type has to be changed (for example from string to int), a migration of content is perfomed together with any necessary update of the mapping code
    1. With a well-defined versioning strategy, when releasing a non-backwards compatible version, you can keep the existing one and the new one working in parallel for a pre-defined window of time
    1. you will need to accommodate backwards compatibility or support multiple versions of an API running in parallel
  4. Sep 2022
    1. "detail": [ { "loc": [ "body", "name" ], "message": "Field required" }, { "loc": [ "body", "email" ], "message": "'not-email' is not an 'email'" } ]

      not complient with Problem Details, which requires details to be a string

  5. Aug 2022
    1. I'm building a Rails API with a separate web frontend app as "just another API client" (various smartphone apps to follow as well). In the previous "monolithic" version of the service, where all the server side was rolled into one Rails app
    1. API Development & Integration Guide for 2022, we all must have heard about But the questions that How is API important for developers and our mobile apps? So in this blog we will help you get all the knowledge about APIs. Read more about: https://bit.ly/3wzeuNC

    1. The Widget API allows you to externally control the widget that is embedded on your website through javascript. You set the width and height of the widget to 0 and it hides the widget. I tinkered with this on codepen this week and I am pleased that I now have a working playlist ready to be utilized on my website.


      ```js var iframeElement = document.querySelector('iframe'); var iframeElementID = iframeElement.id; var widget = SC.Widget(iframeElement); var x = document.getElementById("play");

      widget.bind(SC.Widget.Events.FINISH,function(){ widget.getCurrentSound(function(currentSound) { document.getElementById("currentTrack").innerHTML = currentSound.title; }); });

      function play(){<br /> if (x.innerHTML === "▶") { x.innerHTML = "||"; } else {x.innerHTML = "▶"; } widget.toggle(); };

      function next(){ x.innerHTML = "||"; widget.next(); widget.seekTo(0); widget.getCurrentSound(function(currentSound) { document.getElementById("currentTrack").innerHTML = currentSound.title; }); };

      function prev(){ x.innerHTML = "||"; widget.prev(); widget.seekTo(0); widget.getCurrentSound(function(currentSound) { document.getElementById("currentTrack").innerHTML = currentSound.title; }); };

      widget.bind(SC.Widget.Events.READY, function() { widget.getCurrentSound(function(currentSound) { document.getElementById("currentTrack").innerHTML = currentSound.title;

      widget.getSounds(function(tracks){ for (var i in tracks) {

         $('#tracklist').append("<li class='track-item' id='" + i + "'" + ">" + tracks[i].title + "</li>");
         var s = this.id
        x.innerHTML = "||" ;     widget.getCurrentSound(function(currentSound) {

      document.getElementById("currentTrack").innerHTML = currentSound.title; });



      }); }); ```

    1. yaml definitions: Annotation: type: object required: - user - uri properties: id: type: string description: Unique ID for this Annotation. uri: type: string description: URI which is the target of this Annotation. target: type: array items: - type: object properties: scope: type: array items: - type: string selector: type: array items: - type: object properties: type: description: Type of Selector--see Web Annotation Data Model. type: string source: type: string user: type: string description: User URI in the form of an `acct` prefixed URI. document: type: object description: Target document metadata schema: $ref: '#/definitions/DocumentMetadata' permissions: type: object description: Permissions for this Annotation. created: type: string format: date-time updated: type: string format: date-time AnnotationList: type: object properties: total: type: number rows: type: array items: $ref: '#/definitions/Annotation' DocumentMetadata: type: object properties: eprints: type: object title: type: string twitter: type: object properties: image:src: type: array items: type: string title: type: array items: type: string description: type: array items: type: string card: type: array items: type: string site: type: array items: type: string dc: type: object favicon: type: string prism: type: object highwire: type: object link: type: array items: type: object properties: href: type: string facebook: type: object properties: site_name: type: array items: type: string description: type: array items: type: string title: type: array items: type: string url: type: array items: type: string image: type: array items: type: string type: type: array items: type: string

    1. These are the key parameters.


      rvsection = 0 specifies to only return the lead section.

    1. you can also replicate the bind:this syntax if you please: Wrapper.svelte <script> let root export { root as this } </script> <div bind:this={root} />

      This lets the caller use it like this: <Wrapper bind:this={root} />

      in the same way we can already do this with elements: <div bind:this=

  6. Jul 2022
  7. Jun 2022
    1. # tunejack.sh uses the TuneIn public API (at opml.radiotime.com) to search for # a radio station, print out its details and try to play it somehow.
    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.
  8. May 2022