Revision 50883
Added by Myrto Koukouli about 6 years ago
piwik.service.ts | ||
---|---|---|
33 | 33 |
.catch(this.handleError); |
34 | 34 |
} |
35 | 35 |
|
36 |
getOpenaireId(id: string) { |
|
36 |
getOpenaireId(id: string): Observable<string> {
|
|
37 | 37 |
let url = `${this.apiUrl}getOpenaireId/${id}`; |
38 | 38 |
console.log(`knocking on: ${url}`); |
39 | 39 |
return this.http.get(url) |
40 |
.map( oaId => oaId ) |
|
40 |
.map( oaId => oaId['_body'].toString() )
|
|
41 | 41 |
.catch(this.handleError); |
42 | 42 |
} |
43 | 43 |
|
... | ... | |
57 | 57 |
.catch(this.handleError); |
58 | 58 |
} |
59 | 59 |
|
60 |
savePiwikInfo(repositoryId: string, |
|
61 |
openaireId: string, |
|
62 |
repositoryName: string, |
|
63 |
country: string, |
|
64 |
requestorName: string, |
|
65 |
requestorEmail: string): Observable<string>{ |
|
66 |
let url = `${this.apiUrl}savePiwikInfo?repositoryId=${repositoryId} \ |
|
67 |
&openaireId=${openaireId} \ |
|
68 |
&repositoryName=${repositoryName} \ |
|
69 |
&country=${country} \ |
|
70 |
&requestorName=${requestorName} \ |
|
71 |
&requestorEmail=${requestorEmail}`; |
|
60 |
savePiwikInfo(piwik: PiwikInfo): Observable<string>{ |
|
61 |
let url = `${this.apiUrl}savePiwikInfo`; |
|
72 | 62 |
console.log(`knocking on: ${url}`); |
73 |
|
|
74 | 63 |
httpOptions.withCredentials = true; |
75 |
return this.http.post(url,httpOptions) |
|
64 |
return this.http.post(url,piwik,httpOptions)
|
|
76 | 65 |
.map( res => { |
77 | 66 |
console.log(`responded ${res.statusText}`); |
78 | 67 |
return res.status.toString(); |
Also available in: Unified diff
finished subscriptions and notifications