class_docstr: A little helper to provide minimal interface to interact with Figshare
      
class_docstr_tok: ["A","little","helper","to","provide","minimal","interface","to","interact","with","Figshare"]
docstr: A wrapper around requests calls
  
  to interpolate deposition_id, do basic checks and conversion
docstr_tok: ["A","wrapper","around","requests","calls","to","interpolate","deposition_id",",","do","basic","checks","and","conversion"]
code: def __call__(
      self,
      m,
      url,
      data=None,
      success=None,
      binary=False,
      headers=None,
      return_json=True,
  ):
      """A wrapper around requests calls
  
      to interpolate deposition_id, do basic checks and conversion
      """
      import json
  
      if "://" not in url:
          url_ = self.API_URL + "/" + url
      else:
          url_ = url
  
      headers = headers or {}
      if data is not None and not binary:
          data = json.dumps(data)
          headers["Content-Type"] = "application/json"
      headers["Authorization"] = "token %s" % self.token
  
      lgr.debug(
          "Submitting %s request to %s with data %s (headers: %s)",
          m.__name__,
          url_,
          data,
          "sanitized",  # headers
      )
      r = m(url_, data=data, headers=headers)
      status_code = r.status_code
      if (success != "donotcheck") and (
          (success and status_code not in success)
          or (not success and status_code >= 400)
      ):
          msg = (
              "Got return code %(status_code)s for %(m)s(%(url_)s."
              % locals()
          )
          raise RuntimeError("Error status %s" % msg)
  
      if return_json:
          return r.json() if r.content else {}
      else:
          return r.content
  
imports: from datalad.utils import unlink
  from datalad.interface.base import Interface
  from datalad.interface.base import build_doc
  from datalad.interface.results import get_status_dict
  import logging
label_desc: Use image node_id 3 for calling the FigshareRESTLaison obj's underlying member method code with example usage: obj.__call__(m, url, data, success, binary, headers, return_json) and returns: unknown, r