Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-data-github

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-data-github - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

dist/assets/dummy.css

8

addon/adapters/github-repository.js
import GithubAdapter from './github';
export default GithubAdapter.extend({
buildURL: function(type, id, snapshot) {
var builtURL = this._super(type, id, snapshot);
if(id) {
builtURL = builtURL.replace('repositories', 'repos');
builtURL = builtURL.replace('%2F', '/');
}
return builtURL;
}
});

4

addon/adapters/github-user.js

@@ -6,4 +6,4 @@ import GithubAdapter from './github';

var builtURL = this._super(type, id, snapshot);
if(id==='') {
builtURL = builtURL.replace('users', 'user');
if(id==='#') {
builtURL = builtURL.replace('users/%23', 'user');
}

@@ -10,0 +10,0 @@ return builtURL;

@@ -7,10 +7,12 @@ import DS from 'ember-data';

host: 'https://api.github.com',
headers: Ember.computed('session.githubToken', function() {
return {
Authorization: `token ${this.get('session.githubToken')}`,
};
headers: Ember.computed('session.githubAccessToken', function() {
var headers = {};
if(this.get('session.githubAccessToken')) {
headers.Authorization = `token ${this.get('session.githubAccessToken')}`;
}
return headers;
}),
pathForType: function(type) {
return Ember.String.camelize(type.replace('github',''));
return Ember.String.camelize(Ember.String.pluralize(type.replace('github','')));
}
});
import DS from 'ember-data';
export default DS.Model.extend({
fullName: DS.attr('string'),
name: DS.attr('string')
});
import DS from 'ember-data';
export default DS.Model.extend({
login: DS.attr('string'),
name: DS.attr('string'),

@@ -5,0 +6,0 @@ avatarUrl: DS.attr('string'),

@@ -7,2 +7,3 @@ import GithubSerializer from './github';

id: hash.full_name,
fullName: hash.full_name,
name: hash.name

@@ -9,0 +10,0 @@ };

@@ -5,3 +5,4 @@ import GithubSerializer from './github';

extractSingle: function(store, primaryType, payload, recordId) {
if(recordId==='') {
if(recordId==='#') {
payload.isCurrent = true;
payload.repos_url = payload.repos_url.replace(`users/${payload.login}`, 'user');

@@ -13,3 +14,4 @@ }

hash = {
id: hash.login,
id: hash.isCurrent ? '#' : hash.login,
login: hash.login,
name: hash.name,

@@ -16,0 +18,0 @@ avatarUrl: hash.avatar_url,

{
"name": "ember-data-github",
"version": "0.0.0",
"version": "0.0.1",
"description": "Ember Data library for the GitHub API",

@@ -26,11 +26,11 @@ "directories": {

"ember-cli-dependency-checker": "0.0.8",
"ember-cli-htmlbars": "0.7.4",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-htmlbars": "0.7.6",
"ember-cli-ic-ajax": "0.1.2",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.3.10",
"ember-cli-qunit": "0.3.11",
"ember-cli-uglify": "1.0.1",
"ember-data": "1.0.0-beta.16.1",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-export-application-global": "^1.0.2",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-try": "0.0.4"
"ember-try": "0.0.5"
},

@@ -37,0 +37,0 @@ "keywords": [

@@ -1,2 +0,2 @@

# ember-data-github [![Build Status](https://travis-ci.org/jimmay5469/ember-data-github.svg)](https://travis-ci.org/jimmay5469/ember-data-github)
# ember-data-github [![Build Status](https://travis-ci.org/jimmay5469/ember-data-github.svg?branch=master)](https://travis-ci.org/jimmay5469/ember-data-github) [![Ember Observer Score](http://emberobserver.com/badges/ember-data-github.svg)](http://emberobserver.com/addons/ember-data-github)

@@ -11,5 +11,10 @@ Ember Data library for the [GitHub API](https://developer.github.com/v3/).

To use OAuth endpoints you must also make sure you have a session service which contains a property named `githubToken`.
In order to use OAuth endpoints you must also make sure you have a session service which contains a property named `githubAccessToken` with the currently logged in user's GitHub access token (Exmple: [app/services/session.js](https://github.com/jimmay5469/old-hash/blob/master/app/services/session.js)).
To see what is currently supported check out the `addon/models/` directory. Currently this addon does not support write actions.
Examples:
```
this.get('store').find('githubUser', '#'); // get the current user
this.get('store').find('githubUser', 'jimmay5469'); // get a user
this.get('store').find('githubRepository', 'jimmay5469/old-hash'); // get a repository
```

@@ -16,0 +21,0 @@ ## Installation

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc