code: def pin_post(self, post):
          
          try:
              cid = post['id']
          except KeyError:
              cid = post
  
          params = {
              "cid": cid,
          }
  
          return self._rpc.content_pin(params)
docs: Pin post
  
          :type  post: dict|str|int
          :param post: Either the post dict returned by another API method, or
              the `cid` field of that post.
          :returns: True if it is successful. False otherwise