aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor array params into -http--build-array-args-alistmarty hiatt2022-11-171-0/+5
|
* http vector docstringsmarty hiatt2022-11-101-2/+5
|
* process-response: optionally JSON array as vector, for instance descmarty hiatt2022-11-101-6/+6
|
* http docstringsmarty hiatt2022-11-101-3/+6
|
* opt no-headers arg, only fetch when nilmarty hiatt2022-11-091-8/+10
|
* use a proper dotted alist for response headers listmarty hiatt2022-11-091-2/+2
|
* --init: handle json or full response and handle Link headermarty hiatt2022-11-091-0/+1
|
* http: add response layer to requests:marty hiatt2022-11-091-25/+50
| | | | | | | | | | | - response is a cons of JSON list and http response headers alist - existing --get-json functions now just car the response - we also process JSON array as a list not a vector - this should open the way to handling response headers if we want to, eg for paginating favorites with the Link: header
* add headers arg to http--process-json and --get-json-asyncmarty hiatt2022-11-051-4/+13
|
* Revert "remove unused --append-query-string"marty hiatt2022-11-031-0/+7
| | | | This reverts commit e2fd67b16104ab772a4ef962613cb9f3cb3cea52.
* http.el docstringsmarty hiatt2022-10-311-6/+10
|
* re-write --make-meta-fields-params to build normal params alistmarty hiatt2022-10-301-4/+2
|
* working meta fields updatemarty hiatt2022-10-291-2/+4
|
* remove unused --append-query-stringmarty hiatt2022-09-121-7/+0
|
* factor out http--build-query-string for use PATCH reqs alsomarty hiatt2022-09-121-14/+18
|
* macro declare debug body for auth reqmarty hiatt2022-09-121-0/+1
|
* indentation and stale TODOsmarty hiatt2022-09-121-37/+37
|
* use seq-empty-p and string-empty-p callsmarty hiatt2022-09-051-1/+1
|
* -http: optional silent requests so we can actually messagemarty hiatt2022-09-031-10/+10
|
* http--patch: make general function, not just for notemarty hiatt2022-08-311-11/+8
| | | | - this way we can build funs to change basic account options.
* bump version in boilerplatemarty hiatt2022-08-271-1/+1
|
* docstringsmarty hiatt2022-08-171-2/+3
|
* restore (list (cons call in macromarty hiatt2022-08-071-19/+19
|
* expand authorized-request macro to hand POST requestsmarty hiatt2022-08-071-26/+27
|
* http: --authorized-request macromarty hiatt2022-08-071-48/+46
|
* Merge pull request '2FA login support' (#255) from ↵martianh2022-03-231-0/+8
|\ | | | | | | | | | | Red_Starfish/mastodon-up.el:login into develop Reviewed-on: https://codeberg.org/martianh/mastodon.el/pulls/255
| * change '-' to '--' in between function and namespace namesAbhiseck Paira2022-02-231-1/+1
| | | | | | | | | | | | | | | | mastodon.el currently follows the convention where all function names should have two dashes (not one dash) in between function and namespace names. Update all function names to follow this convention. See issue #205 and pull request #255
| * add helper function `mastodon-http-append-query-string'Abhiseck Paira2022-01-131-0/+8
| | | | | | | | | | | | Add helper function `mastodon-http-append-query-string' which create URLs with query strings appended to its end. (see doc string for details.)
* | update homepage and copyright boilerplatemousebot2022-02-051-1/+1
|/
* pleroma compat commentmousebot2021-12-251-0/+1
|
* apply pleroma patch from #208mousebot2021-12-231-0/+2
|
* bump version to a round numbermousebot2021-12-171-1/+1
|
* boilerplate maintainer contactmousebot2021-12-171-0/+1
|
* depend on emacs 27.1, flychecks, docstrings, etc.mousebot2021-12-171-1/+1
| | | | strictly, the 27.1 dependency is only for proper-list-p in -http.el.
* bump version, change homepage link, readmemousebot2021-12-171-2/+2
|
* a first hack to make media uploads immediate and async.mousebot2021-12-151-1/+1
| | | | | | | | | this commit moves the call to -upload-attached-media into -attach-media. upload-attached-media now uploads a single item only, whichever file has just been selected at the prompt. but we still use the list of attached-media to handle preview displays.
* Do a bit if `if` and `progn` sanitizing.Holger Dürer2021-11-061-13/+11
| | | | | | | - A `progn` with a single form is redundant - `when` doesn't need a `progn` body - `if` has an implicit `progn` for the consequences - I converted one cascade of `if`s into a `cond`.
* Convert most uses of `(cdr (assoc <some-symbol> <a-list>))` to `(alist-get ↵Holger Dürer2021-11-061-5/+5
| | | | | | | <some-symbol> <a-list>)` This is more readable and actually more efficient (maybe) since it uses `eq` rather than `equal` as a test.
* Clean up uses of `url-retrieve-synchronously`.Holger Dürer2021-11-061-28/+12
| | | | | | | | | | We recently introduced a new thin abstraction `mastodon-http--url-retrieve-synchronously` but did not make use of it everywhere. This also moves its definition to the top above its first use. This also removes some dead, commented-out code.
* Reformat all code.Holger Dürer2021-11-061-44/+43
| | | | | | | | | | | Basically, in Emacs for each file: select all text and `indent-region`. - This also removes one redundant comment, and - fixes an error with json decoding where the `json-read-from-string` was actually not within the intended `unless` clause (which explains the warning about "result of (string-equal "" json-string) will be ignored" which I never understood.
* Fix tests.Holger Dürer2021-11-011-4/+12
| | | | | | | | | | | | These needed a bit of tender love and care to get back into passing state. - Move the auth tests to the `test` directory. No idea what it was doing in `lisp`. - Image tests are mostly broken because with later Emacsen we no longer need the `imagemagic` option on create-image. - Some method signatures have changed and mocking calls needed to follow suit.
* Fix compilation warnings.Holger Dürer2021-11-011-1/+1
| | | | | | | | | | | | This is mostly reflowing / reworkding docstrings to keep within 80 characters limit and adding autoloads. There are two warning remaining that I don't understand: - mastodon-async.el:359:16: Warning: reference to free variable ‘url-http-end-of-headers’ - mastodon-http.el:139:8: Warning: value returned from (string-equal json-string "") is unused When adding autoloads this sorts them for better readability.
* merge upload-media-attachments functionality into toot-send.mousebot2021-10-291-3/+4
| | | | | | | | | | | | | | | | | | | | this obviates the need for the user to upload files before posting their toot. - this commit makes http--post-media-attachment synchronous, so that toot-send has to wait for it. - in toot-send: if mastodon-toot--media-attachements is non-nil, the files it contains are uploaded synchronously, and their returned ids are added to toot-media-attachment-ids, which are parsed as args for the POST request to be attached to the toot. - then we send toot as usual. - clear-all-attachments also clears mastodon-toot--media-attachment-ids just in case. - we have no more need of media-attachments-filenames, as media-attachments is now a list and not a boolean value.
* hopefully improve attachment upload error handlingmousebot2021-10-291-9/+15
|
* move read-file-as-stringmousebot2021-10-231-6/+6
|
* remove wrongly set http--timeoutmousebot2021-10-231-2/+2
| | | | | | - http--timeout was given as an 4th arg to url-retrieve, which has nothing to do with timeouts, but is whether to be silent or not. - timeout arg only exists for url-retrieve-synchronously
* flycheck, autoloads, docstringsmousebot2021-10-221-2/+3
|
* docstring typomousebot2021-10-221-1/+1
|
* restore hdurer's http--read-file-as-stringmousebot2021-10-211-0/+6
|
* improvements to toot mentions completionmousebot2021-10-211-6/+8
| | | | | | | | | - customize option for completion off, following-only, or all. - 'following=true' is forwarded to http--get-search accordingly. - use company-grab-symbol-cons + regex, prepend "@" to it - also prepend '@' to the list in get-user-info-no-url - this makes company display user handles prepended with '@', and to match and - enter a handle without duplicating the '@'