#2 get_contact_list_members is broken

Client Lib v1.0
closed-fixed
5
2010-01-23
2010-01-21
Anonymous
No

Get_contact_list_members calls get_contacts when following a rel:next link. This is therefore broken for large lists, especially as get_contacts looks for the token "/contacts" and get_contact_list_members looks for the token "/lists" with which to construct the next URL.

I have submitted an attachment with all the changes I made to your library. They are:

Fix get_contact_list_members to call the right method when following a rel:next link. This appears to have been a cut-and-paste error when constructing the library. If you want to adopt only this change, it exists at line 167.

Change the variable name "next" to "nextl". "Next" is a reserved word in Python.

Reformat some of the extremely long line lengths to better fit on a standard editor's screen. It does not (yet) conform to the Python Style Guide (PEP8, http://www.python.org/dev/peps/pep-0008/\), but it's a heck of a lot better.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-21

    Patch to init.py

     
  • Constant Contact Labs

    The patch was applied and the library has been updated. The function get_contact_list_members now works for lists with multiple pages. I couldn't find any resource that said "next" or "Next" were reserved however, just in case and since "next" isn't very descriptive, the variable name was changed from "next" to "next_path". The reformat from the patch was applied to help with readability. Thank You for the patch.

     
  • Constant Contact Labs

    • labels: --> CTCTConnection (Client Library)
    • milestone: --> Client Lib v1.0
    • assigned_to: nobody --> ctctlabs
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks