Git Product home page Git Product logo

hootsweet's People

Contributors

ciaranmccormick avatar gghildyal avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

hootsweet's Issues

Get message review history

Details
Path Parameters
  • messageId required
Response
{
  "data": {
    "actions": [
      {
        "actorType": "MEMBER",
        "actorId": "12345678",
        "actionType": "CREATE",
        "timestamp": "2017-02-15T18:51:13.000Z"
      }
    ]
  }
}

delete_message API throws an error.

delete_message API doesn't return a 'data' attribute on success, hence the error.

"/Users/gghildyal/ito/projects/gitops/disruption_messaging/disruption_messaging/social/hootsuite.py", line 125, in schedule_message
    self.delete_message()
  File "/Users/gghildyal/ito/projects/gitops/disruption_messaging/disruption_messaging/social/hootsuite.py", line 144, in delete_message
    self.client.delete_message(self.message_id)
  File "/Users/gghildyal/ito/projects/gitops/disruption_messaging/venv/lib/python3.7/site-packages/hootsweet/api.py", line 243, in delete_message
    return self._make_request(resource, method="DELETE")
  File "/Users/gghildyal/ito/projects/gitops/disruption_messaging/venv/lib/python3.7/site-packages/hootsweet/api.py", line 107, in _make_request
    return response.json()["data"]
  File "/Users/gghildyal/ito/projects/gitops/disruption_messaging/venv/lib/python3.7/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Remove a member from an organization.

Details
  • endpoint: /v1/organizations/{organizationId}/members/{memberId}
  • path params:
    • organisationId required
    • memberId required
Response
{
  "data": {}
}

Reject comment

Details
Path Parameters
  • commentId required
Query Parameters
  • parameter
Request Body
  • reason **required (string)
  • sequenceNumber required (integer)
  • reviewerType (string) EXTERNAL or MEMBER
{
  "reason": "Message contains profanity",
  "sequenceNumber": 11,
  "reviewerType": "EXTERNAL"
}
Response

Retrieve outbound messages

Details
Path Parameters
  • organisationId required
Query Parameters
  • startTime required (ISO-8601 format)
  • endTime required (ISO-8601 format)
  • state (string: PENDING_APPROVAL, REJECTED, SENT, SCHEDULED and SEND_FAILED_PERMANENTLY)
  • socialProfileIds (integer)
  • limit (integer) defaults to 50, maximum is 100
  • cursor (string) cursor to a specific page in the results, defaults to the first
  • `includeUnscheduledReviewMsgs (boolean)
Response
{
  "data": [
    {
      "id": "4138476039",
      "state": "SCHEDULED",
      "text": "5 trends that will change how we use social media this year http://owl.li/YuNr2",
      "socialProfile": {
        "id": "115185509",
        "externalURL": "https://www.linkedin.com/in/l-lhs-8654321"
      },
      "scheduledSendTime": "2018-10-25T10:35:00Z",
      "webhookUrls": [
        "https://myserver.com/inbound"
      ],
      "tags": [
        "test_tag"
      ],
      "targeting": {
        "facebookPage": {
          "ageMin": 45,
          "education": [
            "collegeGrad"
          ],
          "interestedIn": [
            "female"
          ],
          "relationshipStatus": [
            "single"
          ],
          "countries": [
            {
              "k": "Canada",
              "v": "CA"
            }
          ],
          "regions": [
            {
              "k": "British Columbia",
              "v": "2"
            }
          ],
          "cities": [
            {
              "k": "Burnaby, BC",
              "v": "292466"
            }
          ],
          "zips": [
            {
              "k": "K1S",
              "v": "CA:K1S"
            }
          ]
        },
        "linkedInCompany": {
          "companySize": [
            "51-200"
          ],
          "geography": [
            "as.jp"
          ],
          "industry": [
            "41"
          ],
          "jobFunction": [
            "qa"
          ],
          "seniority": [
            "en"
          ]
        }
      },
      "privacy": {
        "facebook": {
          "visibility": [
            "everyone"
          ]
        },
        "linkedIn": {
          "visibility": [
            "anyone"
          ]
        }
      },
      "location": {
        "latitude": 57.64911,
        "longitude": 10.40744
      },
      "emailNotification": true,
      "mediaUrls": [
        {
          "thumbnailUrl": "http://static.ow.ly/photos/thumb/cS5.jpg",
          "url": "http://static.ow.ly/photos/normal/cS5.jpg"
        }
      ],
      "media": [
        {
          "id": "aHR0cDovL2V4YW1wbGUub3Jn",
          "thumbnailId": "aHR0cDovL2V4YW1wbGUtMDAwMS5vcmc=",
          "videoOptions": {
            "facebook": {
              "title": "My Video",
              "category": "ENTERTAINMENT"
            }
          }
        }
      ],
      "extendedInfo": [
        {
          "socialProfileType": "PINTEREST",
          "socialProfileId": "123456789",
          "data": {
            "boardId": "123456789012345678",
            "destinationUrl": "https://www.hootsuite.com"
          }
        }
      ],
      "postId": "705207140236001282",
      "postUrl": "https://www.facebook.com/177463958820/posts/10155617296368821",
      "createdByMember": {
        "id": "1389211223"
      },
      "lastUpdatedByMember": {
        "id": "1389211222"
      },
      "sequenceNumber": 3
    }
  ],
  "metadata": {
    "cursor": {
      "next": "1577887200000:4138476039:0",
      "previous": "1577887200000:4138476039:1"
    }
  }
}

Retrieve comment

Details
Path Parameters
  • commentId required
Response
{
  "data": {
    "comment": "This is an example comment.",
    "createdDate": "2019-01-24T00:51:33.000Z",
    "creatorId": "12345",
    "creatorName": "Joe Smith",
    "id": "4138476039",
    "parentId": "126123123_12314",
    "parentType": "POST",
    "reviewState": "COMPLETED",
    "sequenceNumber": 3,
    "socialProfileId": "12345"
  }
}

Reject a message.

Details
Path Parameters
  • messageId required
Request Body
  • reason required (string)
  • sequenceNumber required (string)
  • reviewerType (string) one of EXTERNAL or MEMBER
Response
{
  "data": {}
}

Approve comment

Details
Path Parameters
  • commentId required
Query Parameters
  • parameter
Request Body
  • sequenceNumber required (integer)
  • reviewerType (string) one of EXTERNAL or MEMBER
Response
{
  "data": {}
}

Retrieve a list of teams for a given organisation

Details
  • endpoint:: /v1/organizations/{organizationId}/teams
  • path params
    • organizationId required
Response
{
  "data": [
    {
      "id": "359493",
      "name": "North America Support Team",
      "logoUrl": "http://ow.ly/i/logo.png",
      "createdDate": "2016-01-14T16:27:40Z",
      "createdByMember": {
        "id": "13892119232"
      },
      "modifiedDate": "2016-01-14T16:27:40Z",
      "modifiedByMember": {
        "id": "13892119232"
      }
    }
  ]
}

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.