1. #1
    Sencha User edmilsonefs's Avatar
    Join Date
    Mar 2011
    Location
    Brazil
    Posts
    3
    Vote Rating
    0
    edmilsonefs is on a distinguished road

      0  

    Default Unanswered: Campfire API and how can I use it with ExtJS 4.1

    Unanswered: Campfire API and how can I use it with ExtJS 4.1


    I'm trying to learn doing an ExtJS MVC app this month and during this week I was trying to understand how I can do my app communicate with apps like Campfire API but I have no success.

    I only need to do a simple request: I want to write a simple message in the campfire. (i.e: Message: A new user has been added.)

    The use of the API is very easy:
    Code:
    curl -u [TOKEN]:[PASSWORD] -H 'Content-Type: application/json' -d '{"message":{"body":"Campfire API - Test 01"}}' https://[APP_ACCOUNT].campfirenow.com/room/[ROOM_ID]/speak.json
    But HOW I could/should/can integrate it with my ExtJS app?

    I already read the link listed below, and I tried to put in my code but I got lost.Should I override the Ext.data.connection? Which structure I should change/extends to create a comunication between my ExtJS app with the Campfire API? or I will need to iterate this API with PHP and just sent the json to my ExtJS app?

    I know that your time is very valuable and I don't want to spend it on stupid questions but I think that If I learn to interact with one API probably I will be able to advance in my learning. Additionally maybe my question could resolve others doubts, so any help/information will really be appreciated.

    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    751
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    Does campfirenow.com support CORS or JSONP?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User edmilsonefs's Avatar
    Join Date
    Mar 2011
    Location
    Brazil
    Posts
    3
    Vote Rating
    0
    edmilsonefs is on a distinguished road

      0  

    Default Campfire API supports... doesn't seems that support Cors and jsonP.

    Campfire API supports... doesn't seems that support Cors and jsonP.


    Hi, thanks for getting involved =D

    Based on this thread:
    • CORS (Campfire API doesn't seems that it support Cors.)
    Regarding the jsonP I found this thread:Additionally just to be sure I created a new thread asking about these two supports.

    Other reference: Campfire API.

    If it doesn't support both of them, what could be done on ExtJS side?


    Thanks for the help.

  4. #4
    Sencha User edmilsonefs's Avatar
    Join Date
    Mar 2011
    Location
    Brazil
    Posts
    3
    Vote Rating
    0
    edmilsonefs is on a distinguished road

      0  

    Default Confirmed, Campfire API doesn't support CORS and jsonP

    Confirmed, Campfire API doesn't support CORS and jsonP


    I create a new thread on 37signals-api, and I receive the confirmation:
    • No CORS or JSONP currently, though we're open to supporting them.
      (by Jeremy Kemper)
    Someone could give me an advice?

  5. #5
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    751
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Use a server side script that you can send a cURL or something to campfire.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #6
    Sencha Premium Member Fredric Berling's Avatar
    Join Date
    Sep 2007
    Location
    Sweden
    Posts
    186
    Answers
    4
    Vote Rating
    14
    Fredric Berling has a spectacular aura about Fredric Berling has a spectacular aura about

      0  

    Default


    I have been using the Basecamp API wich looks to be the same for Campfire.

    Its just a matter of doing som php for sending the correct rest request with curl. The returned Json is easily consumed by ExtJS.

    I have a fully working example on gitHub for you to steal from.

    Look at the model and store for "todolists" to get an understanding about the quirks. Especially for posting data back to them.

    https://github.com/Fredric/BASECAMP-Neptune

    Please change the API key in the session.php if you are planning to use it. You can get one from 37Signals.

    Note! It is made in ExtJS 4.2 with Sencha Cmd 3.1 so you would probably need that to rebuild it.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar