Sorry to just catch up on this.
Bruce - your fix worked perfectly for me and has fixed the whole
problem.
Your site and assistance has been brilliant, I'll recommend it as a
resource in the future.
Thanks
Will
On May 11, 9:16 pm, Bruce Mcpherson <
br...@mcpher.com> wrote:
> very good. . good luck with all that. Will post here when I've figured out
> a generic solution for your scenario and Will's
>
> bruce
>
> >> On 11 May 2012 11:16, Jeff Stoddard <
jeffstodd...@gmail.com> wrote:
>
> >>> Bruce - first let me say thank you for all your help. Your site is an
> >>> amazing resource. Apologies for not thanking you in my first email.
>
> >>> If I am following the code correctly, I think this will likely work for
> >>> Will's case, but I don't think it will work for my case as the URLs are
> >>> formatted differently.
>
> >>> In my URLhttps://
nectar.xyz.com/merchants/189/loyaltiesthere is no
> >>>>> On 10 May 2012 19:11, Jeff Stoddard <
jeffstodd...@gmail.com> wrote:
>
> >>>>>> Iris (wonderbra? - are you an alter ego of Will?) & Bruce -
>
> >>>>>> Perhaps I can shed some light as I'm having a similar problem. I need
> >>>>>> to construct a URL with the query in the middle as well.
>
> >>>>>> my format is:
xyz.com/merchant/<ID>/**loyalties which if I simply
> >>>>>> type
> >>>>>> in
xyz.com/merchant/189/loyalties in a browser spits back JSON to me
>
> >>>>>> I can enter all this as a URL in the restLibrary and it will work
> >>>>>> fine, but to get it to work, I have to hard code the merchant ID by
> >>>>>> using "
xyz.com/merchant/189/**loyalties<
http://xyz.com/merchant/189/loyalties>"
> >>>>>> as the URL. Of course, I'd like
> >>>>>> to be able to change the merchant ID by row.
>
> >>>>>> If I try to put 189/loyalties as the parameter it does not work as the
> >>>>>> slash is converted to "%2F" and it gives me a 404 error
>
> >>>>>> If I enter
xyz.com/merchant/189%**2Floyalties<
http://xyz.com/merchant/189%2Floyalties>in the browser, I get a
> >>>>>> 404 error as well, as it seems like the server cannot convert the %2F
> >>>>>> to a slash.
>
> >>>>>> Any thoughts? Not trying to hijack Iris/Will, but I believe this is
> >>>>>> the same problem. If not, I'll start another thread.
>
> >>>>>> Thanks,
> >>>>>> Jeff
>
> >>>>>> On May 9, 10:35 am, "iris.wonderbra iris.wonderbra"
> >>>>>> <
iris.wonder...@googlemail.com**> wrote:
> >>>>>> > Hi Bruce,
>
> >>>>>> > Appreciate it - have tried both of these approaches but no luck.
> >>>>>> When
> >>>>>> > I have "
http://api.klout.com/v2/user.**json/<
http://api.klout.com/v2/user.json/>"
> >>>>>> in the library as the URL
> >>>>>> > and pass the query "<QUERY>/score?key=<KEY>" the API grumbles that I
> >>>>>> > haven't supplied the key. And when I pass the entire URL as the
> >>>>>> query
> >>>>>> > (with the library URL set to "") I get an IXMLHTTPREQUEST failed.
>
> >>>>>> > It seems like the URL is being called before the query is appended
> >>>>>> to
> >>>>>> > it for some reason, and therefore I can't have a partial library URL
> >>>>>> > and pass the rest via the query. Is there a simply way of defining
> >>>>>> the
> >>>>>> > URL here such that the query is appended to its middle rather than
> >>>>>> the
> >>>>>> > end given how you've written the rest of the code?
>
> >>>>>> > With .add("klout score")
> >>>>>> > .add "restType", erQueryPerRow
> >>>>>> > .add "url", "
http://api.klout.com/v2/user.**json/<
http://api.klout.com/v2/user.json/>
> >>>>>> <QUERY>/
> >>>>>> > score?key=<KEY>"
> >>>>>> > .add "results"
> >>>>>> > .add "treeSearch", True
> >>>>>> > .add "ignore", vbNullString
> >>>>>> > End With
>
> >>>>>> > Thanks for the tips Bruce.
>
> >>>>>> > Will
>
> >>>>>> > On May 9, 4:19 pm, Bruce Mcpherson <
br...@mcpher.com> wrote:
>
> >>>>>> > > Will
>
> >>>>>> > > ok .. a couple of solutions.
>
> >>>>>> > > - you make the query include the key each time..
> >>>>>> > > - so your url would just behttp://
api.klout.com/v2/**
> >>>>>> user.json/ <
http://api.klout.com/v2/user.json/>
> >>>>>> > > - the query parameter each time would be <QUERY>/score?
> >>>>>> > > key=xxxx"
> >>>>>> > > - you dont bother with adding your term to the library, and
> >>>>>> just passed
> >>>>>> > > the complete URL to the crest class
>
> >>>>>> > > bruce
> >>>>>> > > 2. you query parameter would include the key
>
> >>>>>> > > On 9 May 2012 03:24, Will Hanschell <
will.hansch...@gmail.com>
> >>>>>> wrote:
>
> >>>>>> > > > Brilliant Bruce, thank you - this is such a great resource.
>
> >>>>>> > > > Your advice makes total sense and works perfectly for the URL I
> >>>>>> > > > supplied. However, my issue still applies for the second call I
> >>>>>> need
> >>>>>> > > > to make.
>
> >>>>>> > > > Klout requires that you call their API once to convert a Twitter
> >>>>>> > > > screenName (the rows in my spreadsheet) to a Klout ID. (This is
> >>>>>> what
> >>>>>> > > > you helped me with before.)
> >>>>>> > > > You then call the API again to lookup a Klout score for that
> >>>>>> Klout ID.
> >>>>>> > > > The URL for that is "
http://api.klout.com/v2/user.**json/<
http://api.klout.com/v2/user.json/>
> >>>>>> <QUERY>/score?
> >>>>>> > > > key=xxxx" where <QUERY> is the query supplied, and here it's
> >>>>>> > > > hierarchical I believe so I can't just swap the terms?
>
> >>>>>> > > > These are probably very simple questions but this is the final
> >>>>>> step in
> >>>>>> > > > this hack! So close!
>
> >>>>>> > > > Will
>
> >>>>>> > > > On May 9, 12:06 am, Bruce Mcpherson <
br...@mcpher.com> wrote:
> >>>>>> > > > > Will
>
> >>>>>> > > > > I dont know if you noticed the rest explorer... you can use
> >>>>>> this to play
> >>>>>> > > > > around with what your rest query returns, as well as play
> >>>>>> around with the
> >>>>>> > > > > parameters and URL.
>
> >>>>>> > > > >
http://ramblings.mcpher.com/**Home/excelquirks/json/**
> >>>>>> restexplore<
http://ramblings.mcpher.com/Home/excelquirks/json/restexplore>
>
> >>>>>> > > > > As I mentioned,
>
> ...
>
> read more »