open-index/open-npm huggingface dataset:
npm package: 42-api.js
Description: An small npm module to fetch the 42 api
Author: X3ne
Latest version: 1.0.1

# 42.js

[![made-with-javascript](https://img.shields.io/badge/Made%20with-JavaScript-1f425f.svg)](https://www.javascript.com)

## 🚧Work in progress🚧

> An small npm module to fetch the 42 api


## Table of Contents

<!-- * [Doc](#doc) -->
* [Install](#install)
* [Usage](#usage)
* [License](#license)

## Install
```sh
npm install 42-api.js
```
```sh
pnpm install 42-api.js
```

## Usage

```js
const Api42 = require('42-api.js');

const client = new Api42({ clientId: client_id, clientSecret: client_secret });

async function GetData() {
    const token = await client.GetToken();
    console.log(token);

    const newToken = await client.GenerateToken();
    console.log(newToken);

    const validity = await client.RefreshToken();
    console.log(validity);

    const users = await client.GetUsers({"filter[login]": 'login'});
    console.log(users);

    const userCursus = await client.GetUserCursus('login');
    console.log(userCursus);

    const userLog = await client.GetUserLocationStats('login')
    console.log(userLog);

    const coalitions = await client.GetCoalitions();
    console.log(coalitions);
}
GetData();
```
### Or
```js
const Api42 = require('42-api.js');

const client = new Api42({ clientId: client_id, clientSecret: client_secret });

client.GetToken().then((data) => {
    console.log(data);
});

client.GenerateToken().then((data) => {
    console.log(data);
});

client.RefreshToken().then((data) => {
    console.log(data);
});

client.GetUsers({"filter[login]": 'login'}).then((data) => {
    console.log(data);
});

client.GetUserCursus('login').then((data) => {
    console.log(data);
});

client.GetUserLocationStats('login').then((data) => {
    console.log(data);
});

client.GetCoalitions().then((data) => {
    console.log(data);
});
```

## License

[MIT](LICENSE) © X3ne
npm package: 42-cent-authorizenet
Description: 42-cent adaptor for Authorize.net payment gateway
Author: Laurent Renard
Latest version: 0.8.0
Deprecated: use authorize-net instead

[![Build Status](https://travis-ci.org/continuous-software/42-cent-authorizenet.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-authorizenet)

[42-cent](https://github.com/continuous-software/42-cent) adaptor for [Authorize.Net](http://www.authorize.net/) payment gateway.
Rely on [node-authorize-net sdk](https://github.com/continuous-software/node-authorize-net)
npm package: 42-cent-beanstream
Description: 42-cent adaptor for beanstream payment gateway
Author: Max Pringle
Latest version: 1.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

[![Build Status](https://travis-ci.org/continuous-software/node-beanstream.svg?branch=master)](https://travis-ci.org/continuous-software/node-beanstream)

# node-beanstream
42-cent NodeJS SDK for Beanstream payment gateway
npm package: 42-cent-braintree
Description: 42-cent adaptor for braintree payment gateway
Author: Laurent Renard
Latest version: 1.0.0

[![Build Status](https://travis-ci.org/continuous-software/42-cent-braintree.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-braintree)

![42-cent-braintree](http://upload.wikimedia.org/wikipedia/commons/9/93/Braintree_logo_small.png)

## Installation ##

    $ npm install -s 42-cent-braintree

## Usage

```javascript
var Braintree = require('42-cent-braintree');
var client = new Braintree({
    MERCHANT_ID: '<PLACEHOLDER>',
    PUBLIC_KEY: '<PLACEHOLDER>',
    PRIVATE_KEY: '<PLACEHOLDER>'
});
```

## Gateway API

This is an adaptor of [braintree_node](https://github.com/braintree/braintree_node) for [42-cent](https://github.com/continuous-software/42-cent).  
It implements the [BaseGateway](https://github.com/continuous-software/42-cent-base) API.
npm package: 42-cent-mock
Description: fake implementation of 42-cent gateway for tests
Author: Laurent Renard
Latest version: 0.1.0

# 42-cent-mock
mock implementation of abstract 42-cent payement gateway to use for tests

## usage

* register the mock factory in place of whatever gateway, the factory will return a singleton instance of the mocked gateway

```Javascript
var cent42=require('42-cent');
var gm=require('42-cent-mock');

cent42.registerGateway('Authorize.net',gm.factory);

```

* stub call and make assertions on arguments
```Javascript
var stub = gm.when('refundTransaction').resolveWith({status:'success'});

gm.factory().refundTransaction('666',{amount:123});

assert.equal(stub.calls.length,1);
assert.equal(stub.calls[0][0], '666')
assert.equal(stub.calls[0][1].amount,123);
```
* clean the currently set stubs (tear down phase of your test)

```Javascript
gm.clean();
```
npm package: 42-cent-model
Description: Models to ease creation of 42-cent parameter entities
Author: Laurent Renard
Latest version: 2.0.2

[![Build Status](https://travis-ci.org/continuous-software/42-cent-model.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-model)

42-cent-model
=============

Set of model to ease creation of 42-cent parameter entities such credit card, prospect, etc
npm package: 42-cent-moneris
Description: 42-cent adaptor for moneris payment gateway
Author: Max Pringle
Latest version: 1.0.4

[![Build Status](https://travis-ci.org/continuous-software/42-cent-moneris.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-moneris)

![node-moneris](https://upload.wikimedia.org/wikipedia/en/6/6b/Moneris_Logo.svg)

## Installation ##

    $ npm install -s 42-cent-moneris

## Usage

```javascript
var moneris = require('node-moneris');
var client = new MonerisMerchant({
    store_id: '<PLACEHOLDER>',
    api_token: '<PLACEHOLDER>',
    country: '<PLACEHOLDER>',
    testMode: '<PLACEHOLDER>'
});
```

## Gateway API

This SDK is natively compatible with [42-cent](https://github.com/continuous-software/42-cent).  
It implements the [BaseGateway](https://github.com/continuous-software/42-cent-base) API.


## Test Values


```javascript
var moneris = require('node-moneris');
var client = new MonerisMerchant({
    store_id: 'store5',
    api_token: 'yesguy',
    country: 'CA',
    testMode: true
});
```

MasterCard
5454545454545454

Make sure testing transaction amounts are less than $11
For specific return messages, check the Penny Value Simulator -- https://developer.moneris.com/More/Testing/Penny%20Value%20Simulator
npm package: 42-cent-nmi
Description: 42-cent adaptor for nmi payment gateway
Author: Laurent Renard
Latest version: 0.3.2
Deprecated: use nmi instead

[![Build Status](https://travis-ci.org/continuous-software/42-cent-nmi.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-nmi)

42-cent-nmi
===========

42-cent adaptor for [NMI payment gateway](https://www.nmi.com/)
npm package: 42-cent-payflow
Description: 42-cent adaptor for PayFlow payment gateway
Author: Laurent Renard
Latest version: 0.6.1
Deprecated: use payflow instead

[![Build Status](https://travis-ci.org/continuous-software/42-cent-payflow.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-payflow)

[42-cent](https://github.com/continuous-software/42-cent) adaptor for [PayFlow](https://www.paypal.com/webapps/mpp/payflow-payment-gateway) payment gateway.
Rely on [node-payflow sdk](https://github.com/continuous-software/node-payflow)
npm package: 42-cent-paypal
Description: 42 cent adaptor for paypal
Author: Laurent RENARD
Latest version: 1.0.0

[![Build Status](https://travis-ci.org/continuous-software/42-cent-paypal.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-paypal)

# 42-cent-paypal
42-cent adaptor for paypal payment gateway
npm package: 42-cent-rocketgate
Description: 42-cent adaptor for rocketgate payment gateway
Author: Laurent Renard
Latest version: 0.4.1
Deprecated: use rocketgate instead

[![Build Status](https://travis-ci.org/continuous-software/42-cent-rocketgate.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-rocketgate)

[42-cent](https://github.com/continuous-software/42-cent) adaptor for [Rocketgate](https://www.rocketgate.com/) payment gateway.
Rely on [node-rocketgate sdk](https://github.com/continuous-software/node-rocketgate).
npm package: 42-cent-stripe
Description: 42-cent adaptor for the stripe payment gateway
Author: Laurent Renard
Latest version: 1.0.0

[![Build Status](https://travis-ci.org/continuous-software/42-cent-stripe.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-stripe)

![42-cent-stripe](http://wiki.redcomponent.com/images/2/25/Stripe_logo_160.png)

## Installation ##

    $ npm install -s 42-cent-stripe

## Usage

```javascript
var Stripe = require('42-cent-stripe');
var client = new Stripe({
    API_SECRET: '<PLACEHOLDER>'
});
```

## Gateway API

This is an adaptor of [stripe-node](https://github.com/stripe/stripe-node) for [42-cent](https://github.com/continuous-software/42-cent).  
It implements the [BaseGateway](https://github.com/continuous-software/42-cent-base) API.
npm package: 42-cent-virtualmerchant
Description: 42-cent adaptor for VirtualMerchant payment gateway
Author: Laurent Renard
Latest version: 0.5.4
Deprecated: use virtualmerchant instead

[42-cent](https://github.com/continuous-software/42-cent) adaptor for [VirtualMerchant](https://www.myvirtualmerchant.com/) payment gateway.
npm package: 42-cent-worldpay
Description: 42-cent adaptor for worldpay payment gateway
Author: Laurent RENARD
Latest version: 1.1.1

[![Build Status](https://travis-ci.org/continuous-software/42-cent-worldpay.svg?branch=master)](https://travis-ci.org/continuous-software/42-cent-worldpay)

![42-cent-worldpay](http://www.heraldscotland.com/resources/images/4317415.png)

## Installation ##

    $ npm install -s 42-cent-worldpay

## Usage

```javascript
var WorldPay = require('42-cent-worldpay').WorldPay;
var client = new WorldPay({
    SERVICE_KEY: '<PLACEHOLDER>',
    CLIENT_KEY: '<PLACEHOLDER>'
});
```

This SDK is natively compatible with [42-cent](https://github.com/continuous-software/42-cent).  
It implements the [BaseGateway](https://github.com/continuous-software/42-cent-base) API.
npm package: 42-cli
Description: Access 21's marketplace without a 21 machine
Author: Smart Contract Solutions, Inc.
Latest version: 1.0.4

# 42

Access the [21 marketplace](https://21.co/learn/21-marketplace/) even if you don’t own a 21 computer yet. 42 is a proxy into the network, with a simple command line tool.

To use it, just install it by running `sudo npm install -g 42-cli` 

    $ 42 status
    Balance: 0 (satoshis)
    Deposit Address: 1MB1V15MprQuQEWR7XGd5L6xnPfyyozDfr

Send bitcoins to your deposit address to fund your account, and then use the buy command as if you had the 21 computer!

    $ 42 status
    Balance: 10000 (satoshis)
    Deposit Address: 1MB1V15MprQuQEWR7XGd5L6xnPfyyozDfr

Buy endpoints calls with: 

    $ 42 buy http://10.155.99.242:5000/retweet/672119569520173056
    Result: "Successfully retweeted by https://twitter.com/Justinbitcoin"
    Spent: 1000 (satoshis)
    Balance: 9000 (satoshis)

Query the price of an endpoint

    $ 42 buy -i http://10.155.99.242:5000/retweet/672119569520173056
    Cost: 1000 (satoshis)

Here’s a list of 402-enabled endpoints you can try (only the ones using 21 buy command supported for now)

[https://docs.google.com/spreadsheets/d/1zNJ3nMqz8DZ_5prldhxKmXQAuT3PYEhjqhTeUK7BY5s/](https://docs.google.com/spreadsheets/d/1zNJ3nMqz8DZ_5prldhxKmXQAuT3PYEhjqhTeUK7BY5s/)

This is a project by BitCorps. [Learn more about us.](http://bitcorps.co/)
npm package: 42-expo-application
Description: A universal module that gets native application information such as its ID, app name, and build version at runtime
Author: 650 Industries, Inc.
Latest version: 4.0.5

# expo-application

Gets native application information such as its ID, app name, and build version at runtime.

# API documentation

- [Documentation for the master branch](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/application.md)

# Installation in managed Expo projects

For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](#https://docs.expo.io/versions/latest/sdk/application/).

# Installation in bare React Native projects

For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.

### Add the package to your npm dependencies

```
expo install expo-application
```

# Contributing

Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).