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
- Host: GitHub
- URL: https://github.com/migme/beachball
- Owner: migme
- Created: 2015-03-24T03:44:02.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-06-16T02:52:26.000Z (about 10 years ago)
- Last Synced: 2025-10-22T13:21:48.314Z (8 months ago)
- Topics: beach, frontend, sdk, web
- Language: JavaScript
- Homepage: https://connect.mig.me
- Size: 196 KB
- Stars: 3
- Watchers: 62
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Migme JS SDK
Migme JavaScript SDK. Throws data to the [Migme API](http://docs.migme.apiary.io/).
[](https://gitter.im/migme/beachball)
[](https://codeship.com/projects/73070)
[](https://codecov.io/github/migme/beachball)
[](https://gemnasium.com/migme/beachball)
[](https://www.npmjs.com/package/migme)
[](https://www.npmjs.com/package/migme)
[](https://github.com/migme/beachball/releases/latest)

## 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
```