Created
May 5, 2015 17:16
-
-
Save MarsuperMammal/4fc8645ac1e9dc96fe1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code Snippet: | |
response = client.call(:get_entities) do |ctx| | |
ctx.cookies auth_cookies | |
ctx.message parentId: view_id, type: "Zone", start: start, count: count | |
end | |
Mock Output: | |
Get Entities API method: Given parentId=001 | |
[{:id=>"123", :name=>"com"}] | |
Given parentId=123 | |
[ | |
{:id=>"124", :name=>"domain1"}, | |
{:id=>"125", :name=>"domain2"}, | |
{:id=>"126", :name=>"domain3"}, | |
{:id=>"127", :name=>"domain4"}, | |
{:id=>"128", :name=>"domain5"} | |
] | |
Given parentId=124 | |
[ | |
{:id=>"224", :name=>"sub1"} | |
{:id=>"225", :name=>"sub2"} | |
{:id=>"226", :name=>"sub3"} | |
] | |
Ideal End result: | |
@somehash | |
{'com' => 123} | |
{'domain1.com' => 124} | |
{'sub1.domain1.com' => 224, | |
'sub2.domain1.com' => 225, | |
'sub3.domain1.com' => 226} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment