Socket
Book a DemoInstallSign in
Socket

gitea-js

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitea-js

[![NPM Version](https://img.shields.io/npm/v/gitea-js)](https://www.npmjs.com/package/gitea-js) [![NPM Types](https://img.shields.io/npm/types/gitea-js)](https://anbraten.github.io/gitea-js/) [![GitHub license](https://img.shields.io/github/license/anbrat

Source
npmnpm
Version
1.21.1
Version published
Weekly downloads
3K
14.47%
Maintainers
1
Weekly downloads
 
Created
Source

Gitea-js api client with Typescript support

NPM Version NPM Types GitHub license GitHub Workflow Status Docs

Gitea-js is an api client automatically created from the official Open api definition of Gitea. The client uses the Fetch Api (native browser support) to make requests. For node you can use cross-fetch to polyfill the Fetch Api.

Version mapping

The major and minor version of this library is mapped to the version of the Gitea api. The patch version of this library is incremented for every release and uses the latest patch version of Gitea.

Gitea-jsGitea
1.19.x1.19 (dev)
1.18.x1.18
1.16.x1.17
< 1.2.01.17

Examples

Browser

import { Api } from 'gitea-js';

const api = new giteaApi('https://try.gitea.com/', {
  token: 'access-token', // generate one at https://gitea.example.com/user/settings/applications
});

const repo = api.repos.repoGet('anbraten', 'gitea-js');
console.log(repo);

Node.js

const { createApi } = require('gitea-js');
const fetch = require('cross-fetch'); // You have to use a fetch compatible polyfill like cross-fetch for Node.JS

const api = new giteaApi('https://try.gitea.com/', {
  token: 'access-token', // generate one at https://gitea.example.com/user/settings/applications
  customFetch: fetch,
});

const repo = api.repos.repoGet('anbraten', 'gitea-js');
console.log(repo);

FAQs

Package last updated on 27 Jul 2023

Did you know?

Socket

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.

Install

Related posts