New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ufc-api-js

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ufc-api-js

Unofficial UFC API for JavaScript. Uses cheerio to scrap the data from ufc.com

latest
npmnpm
Version
1.0.2
Version published
Maintainers
0
Created
Source

UFC API JS

Unofficial UFC API for JavaScript. Uses cheerio to scrap the data from ufc.com

Install

yarn add ufc-api-js

npm i ufc-api-js

Usage

import ufcapi from 'ufc-api-js'; // esm
const ufcapi = require('ufc-api-js').default; // cjs

// Get current ranking
const todayRanking = await ufcapi.ranking.getRanking();

// Response
// [
//   {
//		"category": "Men's Pound-for-Pound Top Rank",
//		"athletes": [
//			{ "rank": 1, "name": "Islam Makhachev" },
//			{ "rank": 2, "name": "Islam Makhachev" },
//			...
//		]
//  },
//  {
//		"category": "Flyweight",
//		"athletes": [
//			{ "rank": 1, "name": "Alexandre Pantoja" },
//			{ "rank": 2, "name": "Brandon Royval" },
//			...
//		]
//  },
//  ...
// ]


// Get athlete informations
const athleteInfos = await ufcapi.athlete.getProfile('conor mcgregor');

// Response
// {
//    info: {
//       active: true,
//        nickname: 'The Notorious',
//        division: 'Lightweight Division',
//        divisionScore: '22-6-0 (W-L-D)'
//    },
//    stats: [
//        { method: 'Wins by Knockout', total: 19 },
//        { method: 'Wins by Submission', total: 1 },
//        { method: 'Former Champion', total: 1 }
//    ],
//    picture : 'https://ufc.com/images/styles/athlete_bio_full_body/s3/2021-07/MCGREGOR_CONOR_L_07-10.png?itok=xbg9Kwfj'
// }

Keywords

ufc

FAQs

Package last updated on 02 Oct 2024

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