This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tinder = require('tinderjs'); | |
var client = new tinder.TinderClient(); | |
var recommendations = []; | |
var counts = {}; | |
var occuranceBeforeLike = 3; | |
var loopCount = 10; | |
/* | |
Get your facebook token here | |
https://www.facebook.com/dialog/oauth?client_id=464891386855067&redirect_uri=https://www.facebook.com/connect/login_success.html&scope=basic_info,email,public_profile,user_about_me,user_activities,user_birthday,user_education_history,user_friends,user_interests,user_likes,user_location,user_photos,user_relationship_details&response_type=token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import angular from 'angular'; | |
import ExampleController from './example-controller/example-controller.js'; | |
import ExampleDirective from './example-directive/example-directive.js'; | |
import ExampleService from './example-service/example-service.js'; | |
export default angular.module('example', []) | |
.controller('exampleController', ExampleController) | |
.service('exampleService', ExampleService) | |
.directive('exampleDirective', () => new ExampleDirective); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class ExampleDirective { | |
constructor() { | |
this.template = '<div>{{ctrl.name}}</div>'; | |
this.restrict = 'E'; | |
this.scope = {}; | |
this.controller = ExampleDirectiveController; | |
this.controllerAs = 'ctrl'; | |
this.bindToController = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class ExampleService { | |
constructor($http) { | |
this.$http = $http; | |
} | |
// Example service function | |
getData () { | |
return this.$http({method: 'GET', url: './api' }); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class ExampleController { | |
constructor() { | |
this.controllerName = 'Example Controller'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../typings/_custom.d.ts" /> | |
import { bootstrap, bind } from 'angular2/angular2'; | |
import { routerInjectables, LocationStrategy, HashLocationStrategy } from 'angular2/router'; | |
import { Spotify } from './services/spotify'; | |
import { App } from './components/app'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../typings/_custom.d.ts" /> | |
import { Component, View, NgIf } from 'angular2/angular2'; | |
import { RouterLink, RouteParams } from 'angular2/router'; | |
import { Spotify } from '../../services/spotify'; | |
import { status, json } from '../../utils/fetch' | |
@Component({ | |
selector: 'artist', | |
viewInjector: [Spotify] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../typings/_custom.d.ts" /> | |
import { Component, View, NgFor, Inject } from 'angular2/angular2'; | |
import { RouterLink, RouteParams } from 'angular2/router'; | |
import { Spotify } from '../../services/spotify'; | |
import { status, json } from '../../utils/fetch' | |
@Component({ | |
selector: 'search', | |
viewInjector: [Spotify] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function status(response) { | |
if (response.status >= 200 && response.status < 300) { | |
return Promise.resolve(response); | |
} | |
return response.text().then(function(text) { | |
throw new Error(text); | |
}); | |
} | |
export function text(response) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../typings/_custom.d.ts" /> | |
import { Injectable } from 'angular2/angular2'; | |
@Injectable() | |
export class Spotify { | |
url: string; | |
constructor() { | |
this.url = 'https://api.spotify.com/v1/'; | |
} |
NewerOlder