Libraries tagged by duration
kielabokkie/uber-cache
9 Downloads
Retrieve & store cache with a fallback for a specific duration
kanel/benchmark
20 Downloads
Benchmark your code by tracking duration and memory usage of your code
iarcadia/time
12 Downloads
A PHP time/duration library... again.
ferencbalogh/timy
40 Downloads
src formats a duration given in seconds into a human-friendly format.
ethanbrooks5827/seedmotionai-presets
1 Downloads
Aspect-ratio, duration, and model capability preset utilities for browser AI image and video generation workflows (GPT Image 2, Nano Banana, Seedance 2.0, Veo 3.1, MiniMax).
eliashaeussler/scope-profiler
29 Downloads
Simple profiler to measure duration, memory usage and memory peak of various scoped actions
drupal-eca-recipe/eca_lib_0050
7 Downloads
An external MCP assistant drafts a conference talk with a user and submits it to Drupal, which owns every rule. The model publishes two tools: one submits, the other answers what a submission has to look like - the window, the accepted levels, the tracks the site currently offers and the duration limit for a level - so the assistant asks instead of exploring the site. Both run the same policy actions, so the rules an assistant is told are the rules it is held to. The submitting tool turns its five arguments into tokens, checks the submission window, the audience level, the track and a per-level duration limit before anything is written, and returns a structured result either way. The speaker is taken from the authenticated account and is not a tool argument. A valid proposal is created unpublished in the talk_review workflow, awaiting human review, and the result carries a link to it. The beginner duration rule is a single action in the diagram, which both tools read, so changing it live changes what the tools do and what they advise with no change on the assistant side.
daphascomp/daphascompsms
2 Downloads
# Authentication Requests made to our APIs must be authenticated, there are two ways to do this: 1. Authenticating using your API apiUsername and apiPassword - `Basic Auth` 2. Authenticating using an Auth Token - `Bearer Token` ## Method 1: Basic Auth Basic Authentication is a method for an HTTP user agent (e.g., a web browser) to provide a apiUsername and apiPassword when making a request. When employing Basic Authentication, users include an encoded string in the Authorization header of each request they make. The string is used by the request’s recipient to verify users’ identity and rights to access a resource. The Authorization header follows this format: > Authorization: Basic base64(apiUsername:apiPassword) So if your apiUsername and apiPassword are `onfon` and `!@pas123`, the combination is `onfon:!@pas123`, and when base64 encoded, this becomes `b25mb246IUBwYXMxMjM=`. So requests made by this user would be sent with the following header: > Authorization: Basic b25mb246IUBwYXMxMjM= | Description | | ---------------------------------------------------------------------------------------------- | | **apiUsername** `String` `Required` Your onfon account apiUsername, retrieved from portal | | **apiPassword** `String` `Required` Your onfon account apiPassword, retrieved from portal | ## Method 2: Bearer Tokens This authentication stategy allows you to authenticate using JSON Web Token ``JWT` that will expire after given duration. Each Access Token is a `JWT`, an encoded JSON object with three parts: the `header`, the `payload`, and the `signature`. The following is an example Access Token generated for Conversations > Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c ### Getting the token To generate the token, make a `POST` request to `/v1/authorization` endpoint with your `apiUsername` and `apiPassword` This request should be made from your server and not on the client side such as browser or mobile environment. You will receive a JSON similar to below: `{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "validDurationSeconds": 3600}` You can use the token received to make API calls. The token will be valid for value of `validDurationSeconds`, before which you should generate a new token. #### Request Body ``` { "apiUsername": "root", "apiPassword": "hakty11" } ``` #### Response Body ``` { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "validDurationSeconds": 3600 } ``` #### Example Curl ``` curl --location --request POST 'https://apis.onfonmedia.co.ke/v1/authorization' \ --data-raw '{ "apiUsername": "correctapiUsername", "apiPassword": "correctapiPassword" } ``` #### Making an API call You will be required to pass the token in `Authorization` header prefixed by `Bearer` when calling other endpoints. Example `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`
bagf/juration-php
78 Downloads
Duration string to time in seconds parser
apiverve/musicnotegenerator
6 Downloads
Music Note Generator is a musical note generator API that creates high-quality WAV audio files of musical notes with precise frequency generation, plus customizable duration on paid plans.
apiverve/daylightduration
6 Downloads
Daylight Duration Calculator computes sunrise, sunset times, and total daylight hours for any geographic location and date using astronomical algorithms.
apiverve/caloriesburned
2 Downloads
Calories Burned estimates the energy any of 1,100+ activities uses, from running and cycling to gardening and office work. Search by name or Compendium code, pass body weight in kg or lb and a duration, and get calories per hour and in total with the MET value, its Compendium code and the intensity class. Personalise with age, sex and height or a measured RMR, or ask how long it takes to burn a calorie target. Automated estimate; not medical advice.
apiverve/airportdistance
6 Downloads
Airport Distance calculates the great-circle distance between two airports, plus estimated travel time, using their 3-letter IATA codes. It provides route distance in miles and kilometers plus estimated flight duration.
theodo/behat-profiling-extension
163 Downloads
A simple profiler that shows you the durating of each step
homlity/sdk-instagram
1 Downloads
SDK PHP de Homlity para la Instagram Graph API con Instagram Login: OAuth embebido, tokens de larga duracion renovables y publicacion de imagenes, carruseles y reels. Sin dependencias de runtime.