
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@ta-interaktiv/api-access
Advanced tools
Functions to access the various API endpoints of the Tamedia Paid Media Universe.
This package centralises the access points to all the different APIs that are currently in use in this organisation.
Should the APIs change at some point (and they will), it should be possible to change this package and have all other packages that depend on API calls be updated automatically.
This package exports functions that return promises for the requested property.
import React, { useState, useEffect } from 'react'
import { getTotalShareCount } from '@ta-interaktiv/api-access'
import { parseHostname } from '@ta-interaktiv/parse-hostname'
export function YourComponent({ articleId }: { articleId: string }) {
const [shareCount, setShareCount] = useState(0)
useEffect(() => {
// Get the share count for an article on a specific publication
// Returns a promise
getTotalShareCount(parseHostname().publicationName, articleId)
// So you have to set the state here
.then(count => setShareCount(count))
}, [articleId])
return <div>{shareCount}</div>
}
This package caches the requests to the API for each domain and article ID, so you can call these functions without having to fear that you flood the API endpoints with requests.
FAQs
Functions to access the various API endpoints of the Tamedia Paid Media Universe.
We found that @ta-interaktiv/api-access demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.