Code Monkey home page Code Monkey logo

mirror-api's People

Contributors

dhermes avatar gabceb avatar marcosbermudez avatar marmat avatar movgp0 avatar scarygami avatar timwintle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mirror-api's Issues

Failed to initialize client library. Discovery document not found.

Hi,

I followed the steps given in the Readme documentation. After creating my application https://go-glass.appspot.com/test/ , i launched in Chrome as well as Firefox. But it throws "Error 500: Internal Server Error
service.js (line 133)
{"error": {"message": "Failed to initialize client library. Discovery document not found.", "code": 500}}" . I tried a lot by creating many applications https://besideglass.appspot.com/test/ still problem persists. :( Please find below request header and URL.

curl 'https://go-glass.appspot.com/test/connect?state=33XP0VZEY3K26ZIK7VS804W2QKLHSC1I&gplus_id=116386942049558404665' -X POST -H 'Host: go-glass.appspot.com' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:23.0) Gecko/20100101 Firefox/23.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Content-Type: application/octet-stream; charset=utf-8' -H 'Referer: https://go-glass.appspot.com/test/' -H 'Cookie: mirror_session=eyJfc2lkIjoidE5NT3dBc2RyV282Y05CWWVuSlZLNSJ9|1381926884|d52bf46449e1cb9914965067c6ead9afb3500a43; GCSCU_651938521824_H3=C=651938521824.apps.googleusercontent.com:S=b6a94056e8627be4406e6e6dd58710421527096a.1GiJehyvtzKf_DHG.6011:I=1381926111:X=1382012511; GCSCE_651938521824_S3=C=651938521824.apps.googleusercontent.com:S=0bfa6203e19ec19ec1d7988d706819fade42c508..8346:I=1381926867:X=1381930467; G_AUTHUSER_S3=0'

Contacts and Subscriptions are not Disconnecting once we signout

The Glass is not disconnecting the contacts and subscriptions once we signout and disconnect.

in /glass:
Uncaught ReferenceError: disconnectCallback is not defined

In /test:

Error 500: Internal Server Error service.js:162
{"error": {"code": 500, "message": "Failed to refresh access token."}} service.js:164

And BTW, I checked in my localhost and chrome/chromium.

Q: I understand the add a cat demo, how do I build non-image related cards?

Hi there - First off, this API/interface emulator is great! Thanks so much.

I've played around with it by setting up my own app engine app/etc. and have gotten the hang of taking a picture and adding a cat/sepia tone. I'm trying to figure out how I could build an app that would not have to do with images but would instead let the user say something (i.e. "what is the price of X") and the text would make it to the app and the app could return a card such as a picture, html, etc.

Any pointers of how to get started on something like this within the emulator would be much appreciated.

Thanks in advance

Authentication error with mixed-case email adresses

Note by Scarygami: Edited the issue name to represent the current actual issue (since there are multiple in this thread and the others have been resolved)

@Scarygami Any clues to this issue? https://mirror-api-1.appspot.com/

2013-04-07 19:22:46.626 /list 500 146ms 0kb Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31
71.202.221.50 - - [07/Apr/2013:19:22:46 -0700] "GET /list HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31" "mirror-api-1.appspot.com" ms=147 cpu_ms=27 cpm_usd=0.000038 instance=00c61b117cf4829ab88a353b885a5310cf3735be
I 2013-04-07 19:22:46.504
URL being requested: https://mirror-api-1.appspot.com/_ah/api/discovery/v1/apis/mirror/v1/rest?userIp=71.202.221.50
E 2013-04-07 19:22:46.617
name: mirror  version: v1
Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
    return handler.dispatch()
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/service.py", line 63, in dispatch
    webapp2.RequestHandler.dispatch(self)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/service.py", line 196, in get
    service = build("mirror", "v1", discoveryServiceUrl=discovery_url + "/discovery/v1/apis/{api}/{apiVersion}/rest", http=http)
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/oauth2client/util.py", line 128, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/apiclient/discovery.py", line 196, in build
    version))
UnknownApiNameOrVersion: name: mirror  version: v1
E 2013-04-07 19:22:46.618
Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 223, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1519, in __call__
    response = self._internal_error(e)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
    return handler.dispatch()
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/service.py", line 63, in dispatch
    webapp2.RequestHandler.dispatch(self)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/service.py", line 196, in get
    service = build("mirror", "v1", discoveryServiceUrl=discovery_url + "/discovery/v1/apis/{api}/{apiVersion}/rest", http=http)
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/oauth2client/util.py", line 128, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/base/data/home/apps/s~mirror-api-1/1.366518254765835796/apiclient/discovery.py", line 196, in build
    version))
UnknownApiNameOrVersion: name: mirror  version: v1

HTML Card Issues for photo-overlay

For a card like this

    "{ "html": "<article class=\"photo\">\n  <img src=\"https://mirror-api-playground.appspot.com/links/filoli-spring-fling.jpg\" width=\"100%\" height=\"100%\">\n  <div class=\"photo-overlay\"/>\n  <section>\n    <p class=\"text-auto-size\">Spring Fling Fundraiser at Filoli</p>\n  </section>\n</article>\n", "notification": { "level": "DEFAULT" } }"

(taken from the Google Developers Glass Playground, https://developers.google.com/glass/playground

it seems that the photo-overlay is not being showed.
Is not implemented yet ?

A complex card like this

    "{ "html": "<article class=\"photo\">\n  <img src=\"https://mirror-api-playground.appspot.com/links/filoli-spring-fling.jpg\" width=\"100%\" height=\"100%\">\n  <div class=\"photo-overlay\"/>\n  <section>\n    <p class=\"text-auto-size\">Spring Fling Fundraiser at Filoli</p>\n  </section>\n</article>\n", "notification": { "level": "DEFAULT" } }"

works properly instead 👍

schermata 2013-05-22 alle 23 39 58

schermata 2013-05-22 alle 23 45 45

Subscription and notification is not working properly

Hi, I am trying to perform subscription and expecting a notification to my service. But my callback service URL is not getting invoked and it fails all the time.

Steps i followed (as per the doc given here):

  1. Created a registered contact "TEST" and it is appearing successfully in the Sharing option.
    "items": [
    {
    "imageUrls": [
    ""
    ],
    "displayName": "TEST",
    "id": "123",
    "kind": "mirror#contactsItem"
    }
  2. Created a subscription with the following details
    "items": [
    {
    "collection": "timeline",
    "verifyToken": "asdf",
    "userToken": "",
    "operation": [
    "UPDATE"
    ],
    "id": "6300929624113152",
    "callbackUrl": "http://localhost:65320/notify",
    "kind": "mirror#subscriptionsItem"
    }
  3. When I chooses the Share option on a card , it show me "TEST" and i able to see the status image as "Shared". But my callback service URL was not getting invoked. I am not sure where i am doing the mistake , whether in the configuration or else in the callback URL..

Please find the attached screen shot where the log's present. Its seems like parse exception. Need your help to solve this issue. Thanks..

mirror-issue2

mirror-issue1

Error: origin_mismatch

Hi.

I followed the instructions and app was successfully uploaded and deployed. However, when I access ,appspot.com/test/ and click on Sign In button and enter my credentials, I get an error:

Error: origin_mismatch

Any suggestion?
Thanks
Ali.

Issues with appcfg.py

You mention:

"Alternatively (because the appcfg.py deploy script sometimes doesn't recognize the symlink correctly) copy the folder endpoints-proto-datastore/endpoints_proto_datastore/ over to mirror_api_server so that you get this folder structure:"

in the README.

What sort of issues are you seeing? If there are cases where it doesn't recognize the symlink, then it is a bug in appcfg.py. However, I don't believe this is the case and it seems there may be some usage error that can be rectified/addressed.

Also, it's probably helpful in terms of deploy times/size to add skip_files:

skip_files:
... LIST OF EXISTING ...

  • ^(./)?endpoints-proto-datastore/endpoints_proto_datastore/.$

REF: https://developers.google.com/appengine/docs/python/config/appconfig#Skipping_Files

Emulator is not working with Daily limit exceeded

Hi, tried to connect to glass emulator, but sign in doesn't seem working. Firebug shows the last request failed with Daily Limit.
[
{
"error": {
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"data": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
]
},
"id": "gapiRpc"
}
]

Installation Notes and Edit Suggestions

I've been working to setup the environment on localhost and on app engine. A couple of notes:

1- When installing on a local server I think you need to update the base_url parameter in utils.py to be "localhost:8080" instead of base_url = "https://" + appname + ".appspot.com"

  1. Instead of editing the app.yaml one could use the -A parameter.

    cd mirror_api_server

    appcfg.py -A myapp update ./

GData scope needed

Hi Gersham,

I'm getting an error accessing 'contacts' properties during login (see logs below) so I'm wondering what scopes you have in your client_secrets.json file.
For contacts, I understand from documentation that we need GData scope https://developers.google.com/google-apps/contacts/v3/#authorizing_requests_to_the_api_name_service ("https://www.google.com/m8/feeds") ... which I thought should be added after line 89 in auth.py
oauth_flow = flow_from_clientsecrets('client_secrets.json', scope='')

 Unfortunately, I haven't been able to get this to successfully work. So I'm punting this to the community.

My excerpt logs below for the 'connect' request.

Best,
Darius

URL being requested: https://wordambush.appspot.com/_ah/api/discovery/v1/apis/mirror/v1/rest?userIp=...
E2013-04-21 07:20:29.967
'Resource' object has no attribute 'contacts'
Traceback (most recent call last):
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in call
rv = self.handle_exception(request, response, e)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in call
rv = self.router.dispatch(request, response)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in call
return handler.dispatch()
File "/base/data/home/apps/swordambush/5.366831316248486240/utils.py", line 62, in dispatch
webapp2.RequestHandler.dispatch(self)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(_args, *_kwargs)
File "/base/data/home/apps/s
wordambush/5.366831316248486240/auth.py", line 137, in post
result = service.contacts().insert(body=body).execute()
AttributeError: 'Resource' object has no attribute 'contacts'
E2013-04-21 07:20:29.968
Traceback (most recent call last):
File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 223, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1519, in call
response = self._internal_error(e)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in call
rv = self.handle_exception(request, response, e)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in call
rv = self.router.dispatch(request, response)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in call
return handler.dispatch()
File "/base/data/home/apps/swordambush/5.366831316248486240/utils.py", line 62, in dispatch
webapp2.RequestHandler.dispatch(self)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(_args, *_kwargs)
File "/base/data/home/apps/s
wordambush/5.366831316248486240/auth.py", line 137, in post
result = service.contacts().insert(body=body).execute()
AttributeError: 'Resource' object has no attribute 'contacts'

The emulator doesn't work anymor

Hello !

First thanks for your great work on sharing your expertise and knowledge on the google glass interface.
Since this morning the emulator is not responding anymore on two emulator I know. Do you know why ? Maybe Google has changed something in its mirror API ?

Many thanks,

Dhbismuth

"Take a Picture" shows a green screen

After I allow the browser to access the camera, a green screen is coming for 3 seconds and the same is being taken as picture. Sometimes camera is not at all working and fails with the following corresponding errors.

NavigatorUserMediaError {code: 1, PERMISSION_DENIED: 1}

Also it seems like only the "Take a Picture" command is recognized and other speech commands are not. Most of the times this error comes.

SpeechRecognitionError {message: "", error: "network", clipboardData: undefined, cancelBubble: false, returnValue: true…}

OS: Ubuntu 12.04 (Though video capture works in Windows)
Cam: Intex IT-305WC
Browser: Chrome/Chromium/Firefox
Host: localhost and appspot

API Explorer redirects and does not show the mirror API

When I try to use the API Explorer to send cards per the Unofficial Mirror API Emulator Documentation I am getting redirected like is being reported here

https://developers.google.com/explorer-help/forum?place=msg%2Fgoogle-apis-explorer-users%2FQpy9WDdNmrw%2F9_aZnZiQoEwJ

I try to go to

https://mmirroremulator.appspot.com/_ah/api/explorer

and get redirected to

https://developers.google.com/apis-explorer/?base=https://mmirroremulator.appspot.com/_ah/api#p/

where I see APIs Discovery Service v1, but I don't see the mirror API.

I have not modified any code, just added the appropriate codes to client_secrets.json per the docs.

Has anyone else run into this? Has anyone else run into this and resolved it?

Thanks in Advance.

Pat

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.