Skip to content

Commit

Permalink
Change SOASTA to Akamai
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesmoon committed May 11, 2021
1 parent ffb7b43 commit cf530cb
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "mPulseAPI"
uuid = "314d2b54-f2c3-11ea-15f2-0bcf2fc50b35"
authors = ["Akamai mPulse DSWB <dswb@akamai.com>"]
version = "1.1.0"
version = "1.1.1"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Communicate with the mPulse Query & Repository REST APIs to fetch information ab
* mPulseAPI.jl: [https://akamai.github.io/mPulseAPI.jl/](https://akamai.github.io/mPulseAPI.jl/)

### REST APIs that this module uses:
* mPulse Query API: [http://docs.soasta.com/query-api/](http://docs.soasta.com/query-api/)
* SOASTA Repository API: [http://docs.soasta.com/repository-api/](http://docs.soasta.com/repository-api/)
* mPulse Query API: [https://developer.akamai.com/api/web_performance/mpulse_query/v2.html](https://developer.akamai.com/api/web_performance/mpulse_query/v2.html)
* mPulse Repository API: [https://developer.akamai.com/api/web_performance/mpulse_cloudtest_repository/v1.html](https://developer.akamai.com/api/web_performance/mpulse_cloudtest_repository/v1.html)

## Quick and dirty usage
This snippet will get you up and running, see the full documentation for more details.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Communicate with the mPulse Query & Repository REST APIs to fetch information ab
* mPulseAPI.jl: [https://akamai.github.io/mPulseAPI.jl/](https://akamai.github.io/mPulseAPI.jl/)

### REST APIs that this module uses:
* mPulse Query API: [http://docs.soasta.com/query-api/](http://docs.soasta.com/query-api/)
* SOASTA Repository API: [http://docs.soasta.com/repository-api/](http://docs.soasta.com/repository-api/)
* mPulse Query API: [https://developer.akamai.com/api/web_performance/mpulse_query/v2.html](https://developer.akamai.com/api/web_performance/mpulse_query/v2.html)
* mPulse Repository API: [https://developer.akamai.com/api/web_performance/mpulse_cloudtest_repository/v1.html](https://developer.akamai.com/api/web_performance/mpulse_cloudtest_repository/v1.html)

## Quick and dirty usage
This snippet will get you up and running, see the full documentation for more details.
Expand Down Expand Up @@ -61,7 +61,7 @@ tenant = getRepositoryTenant(token, name="<tenant name from mPulse>")
### function `setEndpoints`
[mPulseAPI.jl#59-67](https://github.com/akamai/mPulseAPI.jl/tree/master/src/mPulseAPI.jl#L59-L67){: .source-link}

Change the SOASTA API endpoint that we connect to. The default is `https://mpulse.soasta.com/concerto`
Change the mPulse API endpoint that we connect to. The default is `https://mpulse.soasta.com/concerto`

#### Example

Expand Down
2 changes: 1 addition & 1 deletion src/QueryAPI.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###################################################
#
# Copyright 2016 SOASTA, Inc.
# Copyright Akamai, Inc.
# Distributed under the terms of the MIT license
#
# File: QueryAPI.jl
Expand Down
2 changes: 1 addition & 1 deletion src/RepositoryAPI.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###################################################
#
# Copyright 2016 SOASTA, Inc.
# Copyright Akamai, Inc.
# Distributed under the terms of the MIT license
#
# File: RepositoryAPI.jl
Expand Down
12 changes: 6 additions & 6 deletions src/mPulseAPI.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###################################################
#
# Copyright 2016 SOASTA, Inc.
# Copyright Akamai, Inc.
# Distributed under the terms of the MIT license
#
# File: mPulseAPI.jl
Expand Down Expand Up @@ -32,7 +32,7 @@ export LightXML
# Tells docgen.jl to document internal methods as well
const __document_internal = true

const default_SOASTAEndpoint = "https://mpulse.soasta.com/concerto"
const default_mPulseEndpoint = "https://mpulse.soasta.com/concerto"

function __init__()
setEndpoints()
Expand All @@ -41,17 +41,17 @@ function __init__()
end

"""
Change the SOASTA API endpoint that we connect to. The default is `$(mPulseAPI.default_SOASTAEndpoint)`
Change the mPulse API endpoint that we connect to. The default is `$(mPulseAPI.default_mPulseEndpoint)`
#### Example
```julia
mPulseAPI.setEndpoints("https://mpulse-alt.soasta.com/concerto")
```
"""
function setEndpoints(SOASTAEndpoint::AbstractString = default_SOASTAEndpoint)
global mPulseEndpoint = "$SOASTAEndpoint/mpulse/api/v2/"
global RepositoryEndpoint = "$SOASTAEndpoint/services/rest"
function setEndpoints(APIEndpoint::AbstractString = default_mPulseEndpoint)
global mPulseEndpoint = "$APIEndpoint/mpulse/api/v2/"
global RepositoryEndpoint = "$APIEndpoint/services/rest"
global RepositoryService = "$RepositoryEndpoint/RepositoryService/v1"
global TokenEndpoint = "$RepositoryService/Tokens"
global ObjectEndpoint = "$RepositoryService/Objects"
Expand Down
14 changes: 7 additions & 7 deletions test/zzz_change-url-tests.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@test mPulseAPI.default_SOASTAEndpoint == "https://mpulse.soasta.com/concerto"
@test mPulseAPI.default_mPulseEndpoint == "https://mpulse.soasta.com/concerto"

@test isconst(mPulseAPI, :default_SOASTAEndpoint)
@test isconst(mPulseAPI, :default_mPulseEndpoint)

if !isempty(endpoint)
@test mPulseAPI.ObjectEndpoint == "$(endpoint)/services/rest/RepositoryService/v1/Objects"
@test mPulseAPI.mPulseEndpoint == "$(endpoint)/mpulse/api/v2/"
else
@test mPulseAPI.ObjectEndpoint == "$(mPulseAPI.default_SOASTAEndpoint)/services/rest/RepositoryService/v1/Objects"
@test mPulseAPI.mPulseEndpoint == "$(mPulseAPI.default_SOASTAEndpoint)/mpulse/api/v2/"
@test mPulseAPI.ObjectEndpoint == "$(mPulseAPI.default_mPulseEndpoint)/services/rest/RepositoryService/v1/Objects"
@test mPulseAPI.mPulseEndpoint == "$(mPulseAPI.default_mPulseEndpoint)/mpulse/api/v2/"
end


Expand All @@ -18,7 +18,7 @@ new_endpoint = "https://foo.bar.com"
@test mPulseAPI.ObjectEndpoint == "$(new_endpoint)/services/rest/RepositoryService/v1/Objects"
@test mPulseAPI.mPulseEndpoint == "$(new_endpoint)/mpulse/api/v2/"

@test mPulseAPI.setEndpoints() == ("$(mPulseAPI.default_SOASTAEndpoint)/mpulse/api/v2/", "$(mPulseAPI.default_SOASTAEndpoint)/services/rest/RepositoryService/v1")
@test mPulseAPI.setEndpoints() == ("$(mPulseAPI.default_mPulseEndpoint)/mpulse/api/v2/", "$(mPulseAPI.default_mPulseEndpoint)/services/rest/RepositoryService/v1")

@test mPulseAPI.ObjectEndpoint == "$(mPulseAPI.default_SOASTAEndpoint)/services/rest/RepositoryService/v1/Objects"
@test mPulseAPI.mPulseEndpoint == "$(mPulseAPI.default_SOASTAEndpoint)/mpulse/api/v2/"
@test mPulseAPI.ObjectEndpoint == "$(mPulseAPI.default_mPulseEndpoint)/services/rest/RepositoryService/v1/Objects"
@test mPulseAPI.mPulseEndpoint == "$(mPulseAPI.default_mPulseEndpoint)/mpulse/api/v2/"

0 comments on commit cf530cb

Please sign in to comment.