
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A TypeScript SDK for the dev.to API with full type safety and comprehensive documentation
A TypeScript SDK for the dev.to API with full type safety and comprehensive documentation.
✨ Full TypeScript Support - Built with TypeScript, includes comprehensive type definitions
📚 Extensive Documentation - JSDoc comments on all methods and types
🎯 Type-Safe - Catch errors at compile time, not runtime
🚀 Modern - Supports both ESM and CommonJS
🪶 Lightweight - Zero dependencies
🔧 Flexible - Customizable configuration options
npm install devflux
Or with yarn:
yarn add devflux
Or with pnpm:
pnpm add devflux
import { DevFluxClient } from 'devflux';
// Create a client instance
const client = new DevFluxClient();
// Fetch articles
const articles = await client.getArticles({ per_page: 10 });
console.log(articles[0].title);
const client = new DevFluxClient();
// Get all articles by a specific user
const articles = await client.getArticlesByUsername('zororaka', {
page: 1,
per_page: 30
});
articles.forEach(article => {
console.log(`${article.title} - ${article.readable_publish_date}`);
});
const client = new DevFluxClient();
// Get articles tagged with 'javascript'
const jsArticles = await client.getArticlesByTag('javascript', {
per_page: 20
});
const client = new DevFluxClient();
// Get top articles from the last 7 days
const topWeekly = await client.getTopArticles(7);
// Get top articles from the last month
const topMonthly = await client.getTopArticles(30);
// Get top articles of all time
const topAllTime = await client.getTopArticles(Infinity);
const client = new DevFluxClient();
// By article ID
const article = await client.getArticleById(123456);
// By username and slug
const article = await client.getArticleByPath('zororaka', 'my-awesome-post');
console.log(article.title);
console.log(article.description);
console.log(article.url);
const client = new DevFluxClient();
// Get paginated results with metadata
const response = await client.getArticlesPaginated({
page: 1,
per_page: 30
});
console.log(response.data); // Array of articles
console.log(response.hasMore); // Whether there are more pages
console.log(response.page); // Current page number
console.log(response.perPage); // Items per page
const client = new DevFluxClient();
// Get recently published articles
const freshArticles = await client.getFreshArticles();
// Get trending articles
const risingArticles = await client.getRisingArticles();
DevFluxClientThe main client class for interacting with the dev.to API.
new DevFluxClient()
Creates a new DevFlux client instance. No configuration needed - works out of the box!
getArticles(params?: ArticleQueryParams): Promise<Article[]>Fetches a list of articles.
Parameters:
page (number): Page number for paginationper_page (number): Number of articles per page (max: 1000)tag (string): Filter by tagtags (string): Filter by tags (comma-separated)tags_exclude (string): Exclude tags (comma-separated)username (string): Filter by usernamestate ('fresh' | 'rising' | 'all'): Filter by statetop (number): Filter by top articles (days)collection_id (number): Filter by collection IDgetArticlesByUsername(username: string, params?: ArticleQueryParams): Promise<Article[]>Fetches articles by a specific username.
getArticleById(id: number): Promise<Article>Fetches a single article by its ID.
getArticleByPath(username: string, slug: string): Promise<Article>Fetches a single article by username and slug.
getArticlesPaginated(params?: ArticleQueryParams): Promise<PaginatedResponse<Article>>Fetches articles with pagination metadata.
getArticlesByTag(tag: string, params?: ArticleQueryParams): Promise<Article[]>Fetches articles by tag.
getTopArticles(days: number, params?: ArticleQueryParams): Promise<Article[]>Fetches top articles from a specified time period.
getFreshArticles(params?: ArticleQueryParams): Promise<Article[]>Fetches recently published articles.
getRisingArticles(params?: ArticleQueryParams): Promise<Article[]>Fetches trending articles.
DevFlux exports comprehensive TypeScript types:
import type {
Article,
User,
Organization,
FlareTag,
ArticleQueryParams,
PaginatedResponse
} from 'devflux';
ArticleComplete article object with all fields from the dev.to API.
UserUser/author information.
OrganizationOrganization details.
ArticleQueryParamsQuery parameters for filtering and pagination.
PaginatedResponse<T>Wrapper for paginated results with metadata.
DevFlux throws errors when API requests fail:
try {
const articles = await client.getArticles();
} catch (error) {
console.error('Failed to fetch articles:', error.message);
}
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for the dev.to community.
FAQs
A TypeScript SDK for the dev.to API with full type safety and comprehensive documentation
The npm package devflux receives a total of 1 weekly downloads. As such, devflux popularity was classified as not popular.
We found that devflux demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.