|
1 | 1 | import { Injectable } from '@angular/core';
|
2 | 2 | import { Observable } from 'rxjs/Observable';
|
3 |
| -import 'rxjs/add/observable/from'; |
| 3 | +import { of } from 'rxjs/observable/of'; |
4 | 4 |
|
5 |
| -import { ITeam, IMember } from './team.models'; |
| 5 | +import { Team, Member } from './team.models'; |
6 | 6 |
|
7 | 7 | @Injectable()
|
8 | 8 | export class TeamService {
|
9 |
| - getTeam(): Observable<ITeam> { |
10 |
| - return Observable.from([ |
11 |
| - { |
12 |
| - coreTeam: [ |
13 |
| - { |
14 |
| - name: 'Ben Lesh', |
15 |
| - role: 'Developer', |
16 |
| - githubUrl: 'https://github.com/benlesh', |
17 |
| - avatar: 'https://avatars2.githubusercontent.com/u/1540597', |
18 |
| - twitterUrl: 'https://twitter.com/BenLesh', |
19 |
| - webpageUrl: 'http://www.benlesh.com' |
20 |
| - }, |
21 |
| - { |
22 |
| - name: 'Paul Taylor', |
23 |
| - role: 'Developer', |
24 |
| - githubUrl: 'https://github.com/trxcllnt', |
25 |
| - avatar: 'https://avatars2.githubusercontent.com/u/178183', |
26 |
| - twitterUrl: 'https://twitter.com/trxcllnt', |
27 |
| - webpageUrl: 'http://graphistry.com' |
28 |
| - }, |
29 |
| - { |
30 |
| - name: 'Matthew Podwysocki', |
31 |
| - role: 'Developer', |
32 |
| - githubUrl: 'https://github.com/mattpodwysocki', |
33 |
| - avatar: 'https://avatars0.githubusercontent.com/u/49051', |
34 |
| - twitterUrl: 'https://twitter.com/mattpodwysocki', |
35 |
| - webpageUrl: '' |
36 |
| - }, |
37 |
| - { |
38 |
| - name: 'OJ Kwon', |
39 |
| - role: 'Developer', |
40 |
| - githubUrl: 'https://github.com/kwonoj', |
41 |
| - avatar: 'https://avatars1.githubusercontent.com/u/1210596', |
42 |
| - twitterUrl: 'https://twitter.com/_ojkwon', |
43 |
| - webpageUrl: '' |
44 |
| - }, |
45 |
| - { |
46 |
| - name: 'André Staltz', |
47 |
| - role: 'Developer', |
48 |
| - githubUrl: 'https://github.com/staltz', |
49 |
| - avatar: 'https://avatars0.githubusercontent.com/u/90512', |
50 |
| - twitterUrl: 'https://twitter.com/andrestaltz', |
51 |
| - webpageUrl: 'http://staltz.com' |
52 |
| - }, |
53 |
| - { |
54 |
| - name: 'David Driscoll', |
55 |
| - role: 'Developer', |
56 |
| - githubUrl: 'https://github.com/david-driscoll', |
57 |
| - avatar: 'https://avatars0.githubusercontent.com/u/1269157', |
58 |
| - twitterUrl: 'https://twitter.com/david_dotnet', |
59 |
| - webpageUrl: 'http://david-driscoll.github.io' |
60 |
| - }, |
61 |
| - { |
62 |
| - name: 'Tracy Lee', |
63 |
| - role: 'Developer', |
64 |
| - githubUrl: 'https://github.com/ladyleet', |
65 |
| - avatar: 'https://avatars0.githubusercontent.com/u/8270563', |
66 |
| - twitterUrl: 'https://twitter.com/ladyleet', |
67 |
| - webpageUrl: 'http://thisdot.co' |
68 |
| - } |
69 |
| - ], |
70 |
| - learningTeam: [ |
71 |
| - { |
72 |
| - name: 'Tracy Lee', |
73 |
| - role: 'Developer', |
74 |
| - githubUrl: 'https://github.com/ladyleet', |
75 |
| - avatar: 'https://avatars0.githubusercontent.com/u/8270563', |
76 |
| - twitterUrl: 'https://twitter.com/ladyleet', |
77 |
| - webpageUrl: 'http://thisdot.co' |
78 |
| - }, |
79 |
| - { |
80 |
| - name: 'Ashwin Sureshkumar', |
81 |
| - role: 'Developer', |
82 |
| - githubUrl: 'https://github.com/ashwin-sureshkumar', |
83 |
| - avatar: 'https://avatars0.githubusercontent.com/u/4744080', |
84 |
| - twitterUrl: 'https://twitter.com/Sureshkumar_Ash', |
85 |
| - webpageUrl: 'https://t.co/XduklnxpK3' |
86 |
| - }, |
87 |
| - { |
88 |
| - name: 'Brian Troncone', |
89 |
| - role: 'Developer', |
90 |
| - githubUrl: 'https://github.com/btroncone', |
91 |
| - avatar: 'https://avatars3.githubusercontent.com/u/5085101', |
92 |
| - twitterUrl: 'http://twitter.com/btroncone', |
93 |
| - webpageUrl: '' |
94 |
| - }, |
95 |
| - { |
96 |
| - name: 'Sumit Arora', |
97 |
| - role: 'Developer', |
98 |
| - githubUrl: 'https://github.com/sumitarora', |
99 |
| - avatar: 'https://avatars3.githubusercontent.com/u/198247', |
100 |
| - twitterUrl: 'https://twitter.com/arorasumit', |
101 |
| - webpageUrl: 'http://www.arorasumit.com/' |
102 |
| - }, |
103 |
| - { |
104 |
| - name: 'Jen Luker', |
105 |
| - role: 'Developer, A11y', |
106 |
| - githubUrl: 'https://github.com/knittingcodemonkey', |
107 |
| - avatar: 'https://avatars0.githubusercontent.com/u/1584489', |
108 |
| - twitterUrl: 'https://twitter.com/knitcodemonkey', |
109 |
| - webpageUrl: 'http://jenluker.com' |
110 |
| - } |
111 |
| - ] |
112 |
| - } |
113 |
| - ]); |
| 9 | + private readonly coreTeam: Member[] = [ |
| 10 | + { |
| 11 | + name: 'Ben Lesh', |
| 12 | + role: 'Developer', |
| 13 | + githubUrl: 'https://github.com/benlesh', |
| 14 | + avatar: 'https://avatars2.githubusercontent.com/u/1540597', |
| 15 | + twitterUrl: 'https://twitter.com/BenLesh', |
| 16 | + webpageUrl: 'http://www.benlesh.com' |
| 17 | + }, |
| 18 | + { |
| 19 | + name: 'Paul Taylor', |
| 20 | + role: 'Developer', |
| 21 | + githubUrl: 'https://github.com/trxcllnt', |
| 22 | + avatar: 'https://avatars2.githubusercontent.com/u/178183', |
| 23 | + twitterUrl: 'https://twitter.com/trxcllnt', |
| 24 | + webpageUrl: 'http://graphistry.com' |
| 25 | + }, |
| 26 | + { |
| 27 | + name: 'Matthew Podwysocki', |
| 28 | + role: 'Developer', |
| 29 | + githubUrl: 'https://github.com/mattpodwysocki', |
| 30 | + avatar: 'https://avatars0.githubusercontent.com/u/49051', |
| 31 | + twitterUrl: 'https://twitter.com/mattpodwysocki' |
| 32 | + }, |
| 33 | + { |
| 34 | + name: 'OJ Kwon', |
| 35 | + role: 'Developer', |
| 36 | + githubUrl: 'https://github.com/kwonoj', |
| 37 | + avatar: 'https://avatars1.githubusercontent.com/u/1210596', |
| 38 | + twitterUrl: 'https://twitter.com/_ojkwon' |
| 39 | + }, |
| 40 | + { |
| 41 | + name: 'André Staltz', |
| 42 | + role: 'Developer', |
| 43 | + githubUrl: 'https://github.com/staltz', |
| 44 | + avatar: 'https://avatars0.githubusercontent.com/u/90512', |
| 45 | + twitterUrl: 'https://twitter.com/andrestaltz', |
| 46 | + webpageUrl: 'http://staltz.com' |
| 47 | + }, |
| 48 | + { |
| 49 | + name: 'David Driscoll', |
| 50 | + role: 'Developer', |
| 51 | + githubUrl: 'https://github.com/david-driscoll', |
| 52 | + avatar: 'https://avatars0.githubusercontent.com/u/1269157', |
| 53 | + twitterUrl: 'https://twitter.com/david_dotnet', |
| 54 | + webpageUrl: 'http://david-driscoll.github.io' |
| 55 | + }, |
| 56 | + { |
| 57 | + name: 'Tracy Lee', |
| 58 | + role: 'Developer', |
| 59 | + githubUrl: 'https://github.com/ladyleet', |
| 60 | + avatar: 'https://avatars0.githubusercontent.com/u/8270563', |
| 61 | + twitterUrl: 'https://twitter.com/ladyleet', |
| 62 | + webpageUrl: 'http://thisdot.co' |
| 63 | + } |
| 64 | + ]; |
| 65 | + |
| 66 | + private readonly learningTeam: Member[] = [ |
| 67 | + { |
| 68 | + name: 'Tracy Lee', |
| 69 | + role: 'Developer', |
| 70 | + githubUrl: 'https://github.com/ladyleet', |
| 71 | + avatar: 'https://avatars0.githubusercontent.com/u/8270563', |
| 72 | + twitterUrl: 'https://twitter.com/ladyleet', |
| 73 | + webpageUrl: 'http://thisdot.co' |
| 74 | + }, |
| 75 | + { |
| 76 | + name: 'Ashwin Sureshkumar', |
| 77 | + role: 'Developer', |
| 78 | + githubUrl: 'https://github.com/ashwin-sureshkumar', |
| 79 | + avatar: 'https://avatars0.githubusercontent.com/u/4744080', |
| 80 | + twitterUrl: 'https://twitter.com/Sureshkumar_Ash', |
| 81 | + webpageUrl: 'https://t.co/XduklnxpK3' |
| 82 | + }, |
| 83 | + { |
| 84 | + name: 'Brian Troncone', |
| 85 | + role: 'Developer', |
| 86 | + githubUrl: 'https://github.com/btroncone', |
| 87 | + avatar: 'https://avatars3.githubusercontent.com/u/5085101', |
| 88 | + twitterUrl: 'http://twitter.com/btroncone' |
| 89 | + }, |
| 90 | + { |
| 91 | + name: 'Sumit Arora', |
| 92 | + role: 'Developer', |
| 93 | + githubUrl: 'https://github.com/sumitarora', |
| 94 | + avatar: 'https://avatars3.githubusercontent.com/u/198247', |
| 95 | + twitterUrl: 'https://twitter.com/arorasumit', |
| 96 | + webpageUrl: 'http://www.arorasumit.com/' |
| 97 | + }, |
| 98 | + { |
| 99 | + name: 'Jen Luker', |
| 100 | + role: 'Developer, A11y', |
| 101 | + githubUrl: 'https://github.com/knittingcodemonkey', |
| 102 | + avatar: 'https://avatars0.githubusercontent.com/u/1584489', |
| 103 | + twitterUrl: 'https://twitter.com/knitcodemonkey', |
| 104 | + webpageUrl: 'http://jenluker.com' |
| 105 | + } |
| 106 | + ]; |
| 107 | + |
| 108 | + getTeam(): Observable<Team> { |
| 109 | + const team: Team = { |
| 110 | + coreTeam: [...this.coreTeam], |
| 111 | + learningTeam: [...this.learningTeam] |
| 112 | + }; |
| 113 | + return of(team); |
114 | 114 | }
|
115 | 115 | }
|
0 commit comments