These are chat archives for ushahidi/Community

15th
Oct 2015
Kyoungrok Jang
@kyoungrok0517
Oct 15 2015 00:39
This message was deleted
This message was deleted
Kyoungrok Jang
@kyoungrok0517
Oct 15 2015 00:58
If I try to post json to /posts with access_token, I get the following error.
{
  "errors": [
    {
      "status": 403,
      "title": "User 0 is not allowed to create resource posts #0",
      "message": "User 0 is not allowed to create resource posts #0",
      "class": "HTTP_Exception_403",
      "file": "/app/application/classes/Ushahidi/Rest.php",
      "line": 448,
      "trace": [
        {
          "file": "/app/application/classes/Ushahidi/Rest.php",
          "line": 478,
          "function": "_execute_usecase",
          "class": "Ushahidi_Rest",
          "type": "->",
          "args": []
        },
        {
          "file": "/app/application/classes/Ushahidi/Rest.php",
          "line": 79,
          "function": "_prepare_response",
          "class": "Ushahidi_Rest",
          "type": "->",
          "args": []
        },
        {
          "file": "/app/vendor/kohana/core/classes/Kohana/Controller.php",
          "line": 87,
          "function": "after",
          "class": "Ushahidi_Rest",
          "type": "->",
          "args": []
        },
        {
          "function": "execute",
          "class": "Kohana_Controller",
          "type": "->",
          "args": []
        },
        {
          "file": "/app/vendor/kohana/core/classes/Kohana/Request/Client/Internal.php",
          "line": 97,
          "function": "invoke",
          "class": "ReflectionMethod",
          "type": "->",
          "args": [
            {
              "request": {},
              "response": {}
            }
          ]
        },
        {
          "file": "/app/vendor/kohana/core/classes/Kohana/Request/Client.php",
          "line": 114,
          "function": "execute_request",
          "class": "Kohana_Request_Client_Internal",
          "type": "->",
          "args": [
            {},
            {}
          ]
        },
        {
          "file": "/app/vendor/kohana/core/classes/Kohana/Request.php",
          "line": 997,
          "function": "execute",
          "class": "Kohana_Request_Client",
          "type": "->",
          "args": [
            {}
          ]
        },
        {
          "file": "/app/httpdocs/index.php",
          "line": 29,
          "function": "execute",
          "class": "Kohana_Request",
          "type": "->",
          "args": []
        }
      ]
    }
  ]
}
using client_id=ushahidiui
sending this json
{
    "form": 1,
    "locale": "en_US",
    "type": "report",
    "title": "David is Missing",
    "status": "draft",
    "content": "Disheveled, skinny, homeless Kenyan last seen in the vicinity of the greyhound station",
    "values": {
        "full_name": "David Kobia",
        "description": "Skinny, homeless Kenyan last seen in the vicinity of the greyhound station",
        "dob": "272332800",
        "missing_date": "1365543083",
        "last_location": "atlanta",
        "status": "missing"
    },
    "tags": ["missing"]
}
Kyoungrok Jang
@kyoungrok0517
Oct 15 2015 01:09
1) Could I issue my client_id and client_secret?
2) How can I get long-living access_token?
Kyoungrok Jang
@kyoungrok0517
Oct 15 2015 01:33
Please ignore the previous error questions. I think I’m finding the solution
but I’d be happy to know the answers for the two questions right above
Ushbot
@ushbot
Oct 15 2015 07:00
[Jason Mule, Ushahidi] @kyoungrok0517 you can go ahead add your client_id and client_secret in the oauth_clients table. access_tokens in Oauth v2 are short-lived in case they are compromised. It uses the concept of a refresh_token to get a new access_token after expiry -- we still need to fully implement using refresh_tokens for the client.
Ushbot
@ushbot
Oct 15 2015 07:10
[Jess Shorland, Ushahidi] @will and @Jason -- who set up the twitter data source? we've got a question in doorbell and I want to point him in the right direction :-)
[Jason Mule, Ushahidi] @Jess that would be me
[Jess Shorland, Ushahidi] sweet. I'm going to copy you into an email if that's cool with you?
[Jason Mule, Ushahidi] cool
Kyoungrok Jang
@kyoungrok0517
Oct 15 2015 08:06
Great thank you!
Ushbot
@ushbot
Oct 15 2015 12:31
[Juliana Rotich, Ushahidi] anyone know of Ushahidi deployments that tracked the BlackLives matter movement in the US? (After the shootings in Ferguson etc?)
Kyoungrok Jang
@kyoungrok0517
Oct 15 2015 12:53
Now I want to generate custom forms(data types)
I'm testing with the following sample data
{
    "name":"Missing Persons Form",
    "type":"report",
    "description":"PFIF Form",
    "groups":[
        {
            "label":"Person Record",
            "priority": 1,
            "attributes":[
                {
                    "key":"full_name",
                    "label":"Full Name",
                    "type":"varchar",
                    "input":"text",
                    "required":true,
                    "priority":1
                },
                {
                    "key":"description",
                    "label":"Description",
                    "type":"text",
                    "input":"textarea",
                    "required":true,
                    "priority":2
                },
                {
                    "key":"dob",
                    "label":"Date of Birth",
                    "type":"int",
                    "input":"date",
                    "required":false,
                    "priority":3
                },
                {
                    "key":"missing_date",
                    "label":"Missing Date",
                    "type":"int",
                    "input":"date",
                    "required":true,
                    "priority":4
                },
                {
                    "key":"last_location",
                    "label":"Last Known Location",
                    "type":"varchar",
                    "input":"text",
                    "required":false,
                    "priority":5
                },
                {
                    "key":"status",
                    "label":"Status",
                    "type":"varchar",
                    "input":"select",
                    "required":false,
                    "options":[
                        "Missing",
                        "Alive",
                        "Dead"
                    ],
                    "priority":6
                }
            ]
        }
    ]
}
but even though I send this data to /forms, the generated form doesn't contain the requested attributes
Ushbot
@ushbot
Oct 15 2015 18:59
[Charlie Harding, Ushahidi] @all what are the main Platform repositories that we should be tracking in our dashboard?
[Sophie Shepherd, Ushahidi] in github?
[Charlie Harding, Ushahidi] Yeah
[Sophie Shepherd, Ushahidi] github.com/ushahidi/platform
[Sophie Shepherd, Ushahidi] https://github.com/ushahidi/platform-pattern-library is the front-end

[Link]

<p><b><a href="[https://github.com/ushahidi/platform-pattern-library](https://github.com/ushahidi/platform-pattern-library)">ushahidi/platform-pattern-library</a></b></p>

<p>platform-pattern-library - Platform Prototypes and Pattern Library based on the Platform Design Framework</p>

[Will, Ushahidi] github.com/ushahidi/platform-client as well
[Charlie Harding, Ushahidi] Cloud?
Ushbot
@ushbot
Oct 15 2015 19:05
[Will, Ushahidi] I would think so BUT it is private at the moment so only we can access it
[Charlie Harding, Ushahidi] internal dashboard
Ushbot
@ushbot
Oct 15 2015 23:24
[Charlie Harding, Ushahidi] @all can we track our Mapper subscriptions in Recurly? Just have people sign up for free without CC details?
[Charlie Harding, Ushahidi] It would be nice if you could see all subscriptions in there
[Nathaniel Manning, Ushahidi] that would be great
[Charlie Harding, Ushahidi] Trying to add them to https://ushahidi.geckoboard.com/