Skip to content

Commit

Permalink
I have reverted the api version calls to v2 as v3 just doesn't work o…
Browse files Browse the repository at this point in the history
…n the servers we are licensed to use.
  • Loading branch information
Kenneth Shepherd committed Feb 19, 2019
1 parent b46c427 commit b028e69
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class AtelierAPI {
type?: string;
filter?: string;
}): Promise<any> {
return this.request('GET', `v3/${this.ns}/docnames/${category}/${type}`, null, {
return this.request('GET', `v2/${this.ns}/docnames/${category}/${type}`, null, {
filter,
generated
});
Expand All @@ -159,47 +159,47 @@ export class AtelierAPI {
format
};
}
return this.request('GET', `v3/${this.ns}/doc/${name}`, params);
return this.request('GET', `v2/${this.ns}/doc/${name}`, params);
}

putDoc(name: string, data: { enc: boolean; content: string[] }, ignoreConflict?: boolean): Promise<any> {
let params = { ignoreConflict };
return this.request('PUT', `v3/${this.ns}/doc/${name}`, data, params);
return this.request('PUT', `v2/${this.ns}/doc/${name}`, data, params);
}

actionIndex(docs: string[]): Promise<any> {
return this.request('POST', `v3/${this.ns}/action/index`, docs);
return this.request('POST', `v2/${this.ns}/action/index`, docs);
}

actionSearch(params: { query: string; files?: string; sys?: boolean; gen?: boolean; max?: number }): Promise<any> {
return this.request('GET', `v3/${this.ns}/action/search`, null, params);
return this.request('GET', `v2/${this.ns}/action/search`, null, params);
}

actionQuery(query: string, parameters: string[]): Promise<any> {
return this.request('POST', `v3/${this.ns}/action/query`, {
return this.request('POST', `v2/${this.ns}/action/query`, {
query,
parameters
});
}

actionCompile(docs: string[], flags?: string, source = false): Promise<any> {
return this.request('POST', `v3/${this.ns}/action/compile`, docs, { flags, source });
return this.request('POST', `v2/${this.ns}/action/compile`, docs, { flags, source });
}

cvtXmlUdl(source: string): Promise<any> {
return this.request('POST', `v3/${this.ns}/cvt/xml/doc`, source, {}, { 'Content-Type': 'application/xml' });
return this.request('POST', `v2/${this.ns}/cvt/xml/doc`, source, {}, { 'Content-Type': 'application/xml' });
}

getmacrodefinition(docname: string, macroname: string, includes: string[]) {
return this.request('POST', `v3/${this.ns}/action/getmacrodefinition`, {
return this.request('POST', `v2/${this.ns}/action/getmacrodefinition`, {
docname,
macroname,
includes
});
}

getmacrolocation(docname: string, macroname: string, includes: string[]) {
return this.request('POST', `v3/${this.ns}/action/getmacrolocation`, {
return this.request('POST', `v2/${this.ns}/action/getmacrolocation`, {
docname,
macroname,
includes
Expand Down

0 comments on commit b028e69

Please sign in to comment.