Loading ...
Sorry, an error occurred while loading the content.
 

YDN HackDay London 2013

Expand Messages
  • Rahul Hampole
    Hello BOSS Developers, The Yahoo! Developer Network (YDN) will be putting together a HackDay on April 27th – 28th. There are more details at
    Message 1 of 3 , Apr 17, 2013
      Hello BOSS Developers,
      The Yahoo! Developer Network (YDN) will be putting together a HackDay on April 27th – 28th. There are more details at http://developer.yahoo.com/events/hack_europe_london/

      I will be doing a technical talk and a demo using BOSS during the HackDay. I would love to meet any developers who are working with BOSS in London during the event and answer any questions about your products, your business model and BOSS in general. 

      Excited to see some BOSS hacks in person. 

      Regards
      Rahul 
      Product Manager, Yahoo! Search



    • Chris Brown
      Rahul, Thanks so much for your help on this. Here s the URL I m using:
      Message 2 of 3 , Apr 17, 2013
        Rahul,

        Thanks so much for your help on this. Here's the URL I'm using:


        Here's the code (python). It's a work in progress because I want to add some other options and right now I'm not handling errors very well. References to "oauth" refer to the python "oauth2" library that's imported in this class


        def placefinder(self, **kwargs):
                consumer = oauth.Consumer(key=config.yboss_key,secret=config.yboss_secret)
            
                
                 params = { 
                    'oauth_nonce': oauth.generate_nonce(),
                    'oauth_timestamp': int(time.time()),
                    'oauth_version': "1.0",
                    'flags': "J",
                    'q': kwargs.get('q'),
                     'appid': "my_app_id"
                }   

                req = oauth.Request(method="GET",url=url,parameters=params)
                signature_method = oauth.SignatureMethod_HMAC_SHA1()
                req.sign_request(signature_method,consumer,None)

                f = urllib.urlopen(req.to_url())
                retval = json.load(f)

                response = retval.get('bossresponse')

                if response and response.get('responsecode') == "200" and response.get('placefinder'):
                    pl = response.get('placefinder')
                    if pl.get('count') > 0:
                        result = pl.get('results')[0]

                        return (result.get('latitude'), result.get('longitude') )
                    else:
                        raise GeoCodeError("No results found")
                else:
                    if response:
                        msg = "Invalid response: " + str(response.get('responsecode'))
                    else:
                        msg = "No response from YBOSS Geocoder"

                    raise GeoCodeError(msg)


        Also I get XML back in the error rather than JSON even though I have "flags":"J" so I'm assuming I'm doing something wrong there. This is what I get back:

        401 Unauthorized
        <yahoo:error xml:lang="en-US" xmlns:yahoo="http://yahooapis.com/v1/base.rng">
        <yahoo:description>
        Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
        </yahoo:description>
        </yahoo:error>

        Thanks,
        Chris

        On Apr 17, 2013, at 1:59 PM, Rahul Hampole <rhampole@...>
         wrote:

         

        Hello BOSS Developers,
        The Yahoo! Developer Network (YDN) will be putting together a HackDay on April 27th – 28th. There are more details at http://developer.yahoo.com/events/hack_europe_london/

        I will be doing a technical talk and a demo using BOSS during the HackDay. I would love to meet any developers who are working with BOSS in London during the event and answer any questions about your products, your business model and BOSS in general. 

        Excited to see some BOSS hacks in person. 

        Regards
        Rahul 
        Product Manager, Yahoo! Search





      • Luis Siquot
        Great!!! Good luck, I won t be there, becouse I am to far, but I hope you can enjoy it. Luis 2013/4/17 Rahul Hampole ... Great!!! Good
        Message 3 of 3 , Apr 22, 2013
          Great!!! Good luck, I won't be there, becouse I am to far, but I hope you can enjoy it.


               Luis







          2013/4/17 Rahul Hampole <rhampole@...>


          Hello BOSS Developers,
          The Yahoo! Developer Network (YDN) will be putting together a HackDay on April 27th – 28th. There are more details at http://developer.yahoo.com/events/hack_europe_london/

          I will be doing a technical talk and a demo using BOSS during the HackDay. I would love to meet any developers who are working with BOSS in London during the event and answer any questions about your products, your business model and BOSS in general. 

          Excited to see some BOSS hacks in person. 

          Regards
          Rahul 
          Product Manager, Yahoo! Search






        Your message has been successfully submitted and would be delivered to recipients shortly.