Git Product home page Git Product logo

Comments (3)

Mikhail-Zakharov avatar Mikhail-Zakharov commented on September 22, 2024

I found that ZenDeskApi.GetUsers returns only 15 records. It meets manual:
"Returns a collection of users that has a name matching the query passed in through the URL. The list is paginated using offsets. If 15 elements are returned (the page limit), use ?page=2 to check for the next 15 and so on."

ZenDeskApi.GetUsers does not contain any paging parameters.

UPDATE.

I fixed it this way.

    public List<User> GetUsers()
    {
        //return GetCollection<User>(Users);
        List<User> result;
        result=(GetCollection<User>(Users));
        List<User> tmpresult;
        int counter = 2;
        string paging=".xml?page={0}";

        tmpresult=(GetCollection<User>(Users+string.Format(paging, counter)));
        while (tmpresult.Count != 0)
        {
            result.AddRange (tmpresult);
            counter += 1;
            tmpresult = (GetCollection<User>(Users + string.Format(paging, counter)));
        }
        return result; 
    }

from zendeskapi.

Mikhail-Zakharov avatar Mikhail-Zakharov commented on September 22, 2024

When i call ZenDeskApi.GetOgranizationById(sOrganizationID) client send only single request
GET /organizations/20133245.xml

But there is no request
GET /organizations/#{id}/users.xml

UPDATE.

I fixed it this way:

     public Organization GetOgranizationById(int id)
    {
        var request = new ZenRestRequest
        {
            Method = Method.GET,
            Resource = string.Format("{0}/{1}.xml", _organizations, id)
        };

        Organization tmpresult;
        tmpresult = Execute<Organization>(request);

        List<User> tmpresultU;
        tmpresultU = GetCollection<User>(string.Format("{0}/{1}/users.xml", _organizations, id));

        tmpresult.Users = tmpresultU;
        //return Execute<Organization>(request);   
        return tmpresult;
    }  

from zendeskapi.

eneifert avatar eneifert commented on September 22, 2024

Hey guys,

I no longer have a testing environment that I can use to keep supporting this api. Is anyone else out there willing to take this project over? Let me know and I will post in the zendesk forum to send all future requests to you.

Thanks,
Eric

from zendeskapi.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.