Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow listing port-ins, and getting the TNs for a port-in #65

Merged
merged 4 commits into from
May 18, 2022

Conversation

singpolyma
Copy link
Contributor

No description provided.

@ckoegel
Copy link
Contributor

ckoegel commented May 11, 2022

@singpolyma Looks great to me, I just added a test for the new method. I'll have someone else review as well but this should be good to go in our next release, thanks!

@ckoegel
Copy link
Contributor

ckoegel commented May 12, 2022

@singpolyma We would like to add some documentation for this new feature in the form of a code snippet in the README. I've created the snippet below to show an example of creating an array of all portins for an account. Was this usage of .next the way you intended, or is there another way of using the list method I'm unaware of?

client = BandwidthIris::Client.new('account_id', 'username', 'password')

@portins = Array.new
page = BandwidthIris::PortIn.list(client, {'page': 1, 'size': 5})

def get_portins(page)
    page.each do |portin|
        @portins.push(portin)
    end
    unless page.next.nil?
        get_portins(page.next)
    end
end

get_portins(page)

@singpolyma
Copy link
Contributor Author

Yes, that looks very similar to how I am using it in my project

@ckoegel ckoegel merged commit f8236ca into Bandwidth:master May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants