Code Monkey home page Code Monkey logo

Comments (5)

fprimex avatar fprimex commented on August 22, 2024

Here is a working example which was passed on to me privately.

import requests

s = requests.Session()
s.auth = (zendesk.zdesk_email, zendesk.zdesk_password)
article_id = '202794701'

result = s.post(zendesk_url +
               '/api/v2/help_center/articles/' + article_id + '/attachments.json',
               params = {'inline':'true'},
               files = {'file': (fname, open(fname, 'rb'), 'image/png')})

from zdesk.

danielinniss avatar danielinniss commented on August 22, 2024

I was thinking about forking this repo to use requests. Thanks for saving me the trouble.
👍 for moving to use requests

from zdesk.

fprimex avatar fprimex commented on August 22, 2024

While it is completely untested I've started on this: https://github.com/fprimex/zdesk/tree/requests

I have not yet begun to address the file upload issue. Just working to achieve the current functionality with requests rather than httplib2.

from zdesk.

danielinniss avatar danielinniss commented on August 22, 2024

I've forked zdesk to help you with the work on replacing urllib with requests

from zdesk.

fprimex avatar fprimex commented on August 22, 2024

This is done with the 2.3.0 release which has just been made.

from zdesk.

Related Issues (20)

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.