Skip to content

Commit 008256a

Browse files
committed
Auto-generate SDK for CoinAPI Exchange Rates Historical API REST Historical
1 parent 2e9b5f8 commit 008256a

File tree

1,254 files changed

+150909
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,254 files changed

+150909
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.openapi-generator-ignore
2+
config.gpr
3+
defaultpackage.gpr
4+
src/-client.adb
5+
src/.ads
6+
src/client/-clients.adb
7+
src/client/-clients.ads
8+
src/model/-models.adb
9+
src/model/-models.ads
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.13.0
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
abstract project Config is
2+
for Source_Dirs use ();
3+
4+
type Yes_No is ("yes", "no");
5+
6+
type Library_Type_Type is ("relocatable", "static", "static-pic");
7+
8+
type Build_Type is ("distrib", "debug", "optimize", "profile", "coverage");
9+
Mode : Build_Type := external ("BUILD", "debug");
10+
11+
Processors := External ("PROCESSORS", "1");
12+
13+
package Builder is
14+
for Default_Switches ("Ada") use ("-j" & Processors);
15+
end Builder;
16+
17+
package compiler is
18+
warnings := ("-gnatwua");
19+
defaults := ("-gnat2012");
20+
case Mode is
21+
when "distrib" =>
22+
for Default_Switches ("Ada") use defaults & ("-O2", "-gnatafno", "-gnatVa", "-gnatwa");
23+
24+
when "debug" =>
25+
for Default_Switches ("Ada") use defaults & warnings
26+
& ("-g", "-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM127");
27+
28+
when "coverage" =>
29+
for Default_Switches ("Ada") use defaults & warnings
30+
& ("-g", "-O2", "-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM127",
31+
"-fprofile-arcs", "-ftest-coverage");
32+
33+
when "optimize" =>
34+
for Default_Switches ("Ada") use defaults & warnings
35+
& ("-O2", "-gnatn", "-gnatp", "-fdata-sections", "-ffunction-sections");
36+
37+
when "profile" =>
38+
for Default_Switches ("Ada") use defaults & warnings & ("-pg");
39+
40+
end case;
41+
end compiler;
42+
43+
package binder is
44+
case Mode is
45+
when "debug" =>
46+
for Default_Switches ("Ada") use ("-E");
47+
48+
when others =>
49+
for Default_Switches ("Ada") use ("-E");
50+
51+
end case;
52+
end binder;
53+
54+
package linker is
55+
case Mode is
56+
when "profile" =>
57+
for Default_Switches ("Ada") use ("-pg");
58+
59+
when "distrib" =>
60+
for Default_Switches ("Ada") use ("-s");
61+
62+
when "optimize" =>
63+
for Default_Switches ("Ada") use ("-Wl,--gc-sections");
64+
65+
when "coverage" =>
66+
for Default_Switches ("ada") use ("-fprofile-arcs");
67+
68+
when others =>
69+
null;
70+
end case;
71+
72+
end linker;
73+
74+
package Ide is
75+
for VCS_Kind use "git";
76+
end Ide;
77+
78+
end Config;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
-- Exchange Rates Historical REST API
2+
-- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3+
-- The version of the OpenAPI document: 1.0.0
4+
--
5+
-- https://openapi-generator.tech
6+
--
7+
-- NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech).
8+
with "config";
9+
with "utilada_sys";
10+
with "utilada_xml";
11+
with "utilada_curl";
12+
with "security";
13+
with "swagger";
14+
project defaultPackage is
15+
16+
for Object_Dir use "obj/";
17+
for Source_Dirs use ("src", "src/model", "src/client");
18+
Mains := ("-client.adb");
19+
20+
package Binder renames Config.Binder;
21+
package Builder renames Config.Builder;
22+
package Compiler renames Config.Compiler;
23+
package Linker renames Config.Linker;
24+
25+
end defaultPackage;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
-- ------------ EDIT NOTE ------------
2+
-- Exchange Rates Historical REST API
3+
-- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
-- This file was generated with openapi-generator. You can modify it to implement
5+
-- the client. After you modify this file, you should add the following line
6+
-- to the .openapi-generator-ignore file:
7+
--
8+
-- src/.ads
9+
--
10+
-- Then, you can drop this edit note comment.
11+
-- ------------ EDIT NOTE ------------
12+
with .Clients;
13+
with .Models;
14+
with Swagger;
15+
with Swagger.Credentials.OAuth;
16+
with Util.Http.Clients.Curl;
17+
with Ada.Text_IO;
18+
with Ada.Command_Line;
19+
with Ada.Calendar.Formatting;
20+
with Ada.Exceptions;
21+
procedure .Client is
22+
23+
use Ada.Text_IO;
24+
25+
procedure Usage;
26+
27+
Server : constant Swagger.UString := Swagger.To_UString ("http://localhost:8080/v2");
28+
Arg_Count : constant Natural := Ada.Command_Line.Argument_Count;
29+
Arg : Positive := 1;
30+
31+
procedure Usage is
32+
begin
33+
Put_Line ("Usage: defaultPackage {params}...");
34+
end Usage;
35+
36+
begin
37+
if Arg_Count <= 1 then
38+
Usage;
39+
return;
40+
end if;
41+
Util.Http.Clients.Curl.Register;
42+
declare
43+
Command : constant String := Ada.Command_Line.Argument (Arg);
44+
Item : constant String := Ada.Command_Line.Argument (Arg + 1);
45+
Cred : aliased Swagger.Credentials.OAuth.OAuth2_Credential_Type;
46+
C : .Clients.Client_Type;
47+
begin
48+
C.Set_Server (Server);
49+
C.Set_Credentials (Cred'Unchecked_Access);
50+
Arg := Arg + 2;
51+
52+
exception
53+
when E : Constraint_Error =>
54+
Put_Line ("Constraint error raised: " & Ada.Exceptions.Exception_Message (E));
55+
56+
end;
57+
end .Client;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-- Exchange Rates Historical REST API
2+
-- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3+
-- ------------ EDIT NOTE ------------
4+
-- This file was generated with openapi-generator. You can modify it to implement
5+
-- the server. After you modify this file, you should add the following line
6+
-- to the .openapi-generator-ignore file:
7+
--
8+
-- src/.ads
9+
--
10+
-- Then, you can drop this edit note comment.
11+
-- ------------ EDIT NOTE ------------
12+
package is
13+
14+
end ;

0 commit comments

Comments
 (0)