An open API service indexing awesome lists of open source software.

https://github.com/migme/beachball

:soccer: Migme JS SDK
https://github.com/migme/beachball

beach frontend sdk web

Last synced: 5 months ago
JSON representation

:soccer: Migme JS SDK

Awesome Lists containing this project

README

          

# Migme JS SDK

Migme JavaScript SDK. Throws data to the [Migme API](http://docs.migme.apiary.io/).

[![Gitter](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg)](https://gitter.im/migme/beachball)
[![Codeship](https://img.shields.io/codeship/5e7f47c0-bfe9-0132-39f9-7eb09717a41c.svg)](https://codeship.com/projects/73070)
[![Codecov](https://img.shields.io/codecov/c/github/migme/beachball.svg)](https://codecov.io/github/migme/beachball)
[![Dependency Status](https://gemnasium.com/migme/beachball.svg)](https://gemnasium.com/migme/beachball)
[![npm](https://img.shields.io/npm/v/migme.svg)](https://www.npmjs.com/package/migme)
[![npm](https://img.shields.io/npm/dm/migme.svg)](https://www.npmjs.com/package/migme)
[![GitHub Releases](https://img.shields.io/github/downloads/migme/beachball/latest/total.svg)](https://github.com/migme/beachball/releases/latest)

![Beachball Migbot](https://cdn.rawgit.com/mixstix/5eb0fe3bea4e87ea5034/raw/fbf873d7d1b3c845e9e0f9613690489203479fcc/beachball.svg "Beachball Migbot")

## Installation

### NPM
```bash
npm install migme
```

## Usage

### Loading
```js
// ES6
import Migme from 'migme'

// CommonJS
var Migme = require('migme')

// AMD
define(['migme'], function (Migme) {
// ...
})
```

#### Loading in browser
```html

window.migmeAsyncInit = function() {
MIGME.init({
client_id : 'your-client-id',
version : 'v1.0',
});
};

(function(d, s, id){
var js, mjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.mig.me/lib/sdk.js";
mjs.parentNode.insertBefore(js, mjs);
}(document, 'script', 'migme-jssdk'));

```

#### Share Buttons
Create a share button on your site. (Initialization is required)
```html



```

### Initialization
```js
MIGME.init({
// options
client_id: 'XXXXXXXXXXXXX',
access_token: '' // If you already have one
})
```

### Development
```bash
npm install # Install dependencies
npm test # Test only
npm run build # Build only
```