Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
samoconnor committed Nov 10, 2017
1 parent 4db1a46 commit 8a74ec7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/AWSAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ is_rest_service(service) = ismatch(r"^rest", service["metadata"]["protocol"])

function member_name(service, name, info)

name = get(info, "locationName", name)
if haskey(info, "locationName")
name = info["locationName"]
else
shape = service["shapes"][info["shape"]]
if get(shape, "flattened", false)
if shape["type"] == "list"
name = shape["member"]["shape"]
name = get(shape["member"], "locationName", name)
end
end
end

if service["metadata"]["signingName"] == "ec2"
name = string(uppercase(name[1]), name[2:end])
Expand All @@ -69,7 +79,6 @@ function service_args(service, name)

m = filter((n, i) -> (n in get(shape, "required", [])), shape["members"])


args = join(["$(member_name(service, name, info))="
for (name, info) in m], ", ")
if length(m) < length(shape["members"])
Expand Down Expand Up @@ -243,7 +252,7 @@ function service_operation(service, operation, info)
# Example: $(eg["title"])
$(eg["description"])
$(get(eg,"description", ""))
"""

if haskey(eg, "input")
Expand Down
2 changes: 1 addition & 1 deletion src/HTML2MD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function start_node_server()
@assert server_process == nothing

if !isdir(joinpath(@__DIR__, "node_modules"))
run(`$(npm_cmd()) install to-markdown`, dir=@__DIR__)
run(setenv(`$(npm_cmd()) install to-markdown`, dir=@__DIR__))
end

server_process = spawn(`$(nodejs_cmd()) -e """
Expand Down
18 changes: 18 additions & 0 deletions src/Services.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,24 @@ polly(verb, resource, args=[]) =

polly(a...; b...) = polly(a..., b)

function pricing(aws::AWSConfig, operation, args=[])

AWSCore.service_json(
aws;
service = "pricing",
version = "2017-10-15",
endpoint = "api.pricing",
json_version = "1.1",
target = "AWSPriceListService",
operation = operation,
args = args)
end

pricing(operation, args=[]) =
pricing(default_aws_config(), operation, args)

pricing(a...; b...) = pricing(a..., b)

function rds(aws::AWSConfig, operation, args=[])

AWSCore.service_query(
Expand Down

0 comments on commit 8a74ec7

Please sign in to comment.