Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
extra-life-ts
Advanced tools
Yet another Extra Life API wrapper. extra-life-ts
adds some endpoints that are missing from other libraries and supports filtering/ordering on endpoints that allow it.
# NPM
$ npm i extra-life-ts
# Yarn
$ yarn add extra-life-ts
# PNPM
$ pnpm i extra-life-ts
const { getParticipantDonations } = require('extra-life-ts')
getParticipantDonations(479600, { limit: 1, orderBy: 'amount ASC' }).then((result) => console.log(result))
const { getParticipantDonations } from 'extra-life-ts'
const donations = await getParticipantDonations(479600, { limit: 1, orderBy: 'amount ASC' })
All endpoints that that return an array support filtering, ordering and limiting. These collections have the following response format:
interface Result<T> {
totalRecords: number
data: T
}
These endpoints also accept an options object with the following properties:
interface Options<T, IncludedFields extends keyof T | undefined = undefined> {
limit?: number
page?: number
orderBy?: `${Exclude<keyof T, symbol>} ${'DESC' | 'ASC'}`
where?: {
fieldName: keyof T
operator: 'LIKE' | '>' | '>=' | '<' | '<=' | '='
term: string | number
}
}
For example, to limit to 2, order by amount
and filter by amount greater than or equal to $50:
getTeamDonations(60010, {
limit: 2,
orderBy: 'amount ASC',
where: {
fieldName: 'amount',
operator: '>=',
term: 50,
},
})
Endpoints that only return a single object (getParticipant()
and getTeam()
) do not support filtering/ordering/limiting. The response is:
interface Result<T> {
data: T
}
getParticipant(id)
getParticipantActivity(id, options)
getParticipantBadges(id, options)
getParticipantDonations(id, options)
getParticipantDonors(id, options)
getParticipantIncentives(id, options)
getParticipantMilestones(id, options)
getTeam(id)
getTeamActivity(id, options)
getTeamBadges(id, options)
getTeamDonations(id, options)
getTeamDonors(id, options)
See LICENSE.md
FAQs
A typed wrapper for the Extra Life API
We found that extra-life-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.