It needs to be exactly as in my example, with an underscore.

Cookies and cache are, by default, stored for scripts. You'll need to disable 
them in your script if you don't want those enabled. You can see other scripts 
in RBTools for examples of how this works in response to the 
--disable-cache-storage and --disable-cookie-storage options.

Christian

--  
Christian Hammond - christ...@beanbaginc.com  
Review Board - https://www.reviewboard.org  
Beanbag, Inc. - https://www.beanbaginc.com

-----Original Message-----
From: dang.tab <dang.t...@gmail.com>
Reply: dang.tab <dang.t...@gmail.com>>
Date: July 14, 2015 at 4:20:30 PM
To: reviewboard@googlegroups.com <reviewboard@googlegroups.com>>
Cc: chip...@chipx86.com <chip...@chipx86.com>>
Subject:  Re: Problem with api-get

> Thank you for the quick response. When I made the suggested change to the
> "users" statement, I ran into the following problem:-
>  
> users = root.get_users(max-results=200)
> SyntaxError: keyword can't be an expression
>  
> Regarding changing the username/password, I made that change after the
> script had exited. I then re-ran the script with the new username/password,
> but it complained about the username/password. If I then changed the
> username/password back to the way it was, it ran successfully. Since these
> are all happening within different processes, I don't think I need to clear
> the api cache or cookie.
>  
>  
> On Tuesday, July 14, 2015 at 4:01:44 PM UTC-7, Christian Hammond wrote:
> >
> > Hi,
> >
> > You need to do:
> >
> > users = root.get_users(max_results=200)
> >
> > How are you changing the username/password? Note that you may have to
> > clear the API cache and cookie if switching users within the same process.
> >
> > Christian
> >
> > --
> > Christian Hammond - chi...@chipx86.com  
> > Review Board - https://www.reviewboard.org
> > Beanbag, Inc. - https://www.beanbaginc.com
> >
> > -----Original Message-----
> > From: dang.tab >
> > Reply: revie...@googlegroups.com > > >>
> > Date: July 14, 2015 at 4:00:10 PM
> > To: revie...@googlegroups.com > > >>
> > Cc: chi...@chipx86.com >>
> > Subject: Re: Problem with api-get
> >
> > > Thank you! That worked. However when I then tried the following in
> > python,
> > > it returned just the first 25 users only, not 200.
> > >
> > > from rbtools.api.client import RBClient
> > >
> > > client = RBClient('http://',
> > > username='', password='')
> > > root = client.get_root()
> > > users = root.get_users("max-results==200")
> > >
> > > Another strange thing that happened is if I then changed the
> > > username/password to that of a different user, the above code fragment
> > did
> > > not work. It complained that the username or password was not correct. I
> > > double checked and know for fact that I did entered the correct username
> > > and password.
> > >
> > > Please advise. Thank you.
> > >
> > >
> > >
> > >
> > > On Tuesday, July 14, 2015 at 12:27:16 PM UTC-7, Christian Hammond wrote:
> > > >
> > > > Hi,
> > > >
> > > > Looks like our help output may be wrong. Try it without the extra
> > '--'.
> > > > I'll make sure this is fixed for the next release.
> > > >
> > > > Christian
> > > >
> > > > --
> > > > Christian Hammond - chi...@chipx86.com
> > > > Review Board - https://www.reviewboard.org
> > > > Beanbag, Inc. - https://www.beanbaginc.com
> > > >
> > > > On Tue, Jul 14, 2015 at 12:03 PM, dang.tab > > > wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >> I am running into the following with trying to extract a list of
> > users:-
> > > >>
> > > >> D:\ws\dev>rbt api-get -d http:///api/users/ --
> > > >> --start=201 --max-results=200
> > > >> >>> RBTools 0.7.4
> > > >> >>> Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit
> > > >> (Intel)]
> > > >> >>> Running on Windows-7-6.1.7601-SP1
> > > >> >>> Home = C:\Users\\AppData\Roaming
> > > >> >>> Current directory = D:\ws\dev
> > > >> usage: rbt api-get [options] [-- [--= ...]]
> > > >>
> > > >> Retrieve raw API resource payloads.
> > > >> rbt: error: Unexpected query argument --
> > > >>
> > > >> I believe I have entered the correct query syntax, but it is
> > complaining
> > > >> about "unexpected query argument --". What do I need to do to get
> > this to
> > > >> work?
> > > >>
> > > >> Thank you.
> > > >>
> > > >> --
> > > >> Supercharge your Review Board with Power Pack:
> > > >> https://www.reviewboard.org/powerpack/
> > > >> Want us to host Review Board for you? Check out RBCommons:
> > > >> https://rbcommons.com/
> > > >> Happy user? Let us know! https://www.reviewboard.org/users/
> > > >> ---
> > > >> You received this message because you are subscribed to the Google
> > Groups
> > > >> "reviewboard" group.
> > > >> To unsubscribe from this group and stop receiving emails from it,
> > send an
> > > >> email to reviewboard...@googlegroups.com .
> > > >> For more options, visit https://groups.google.com/d/optout.
> > > >>
> > > >
> > > >
> > >
> > > --
> > > Supercharge your Review Board with Power Pack:
> > https://www.reviewboard.org/powerpack/
> > > Want us to host Review Board for you? Check out RBCommons:
> > https://rbcommons.com/
> > > Happy user? Let us know! https://www.reviewboard.org/users/
> > > ---
> > > You received this message because you are subscribed to the Google
> > Groups "reviewboard"
> > > group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to reviewboard...@googlegroups.com .
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> >

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to