package slack
Slack API implementation
Install
Dune Dependency
Authors
Maintainers
Sources
0.1.tar.gz
md5=f3be3accbb3b77babbc9b672746c603b
sha512=e715aa318eee97c65d254e1a2b052fb08a8e113d11343272c03a13cccd2f74a480678e064bcb6c901624aadcb83d16eabadbd6caa9181465a920cb69aee8f644
doc/src/slack.lib/common.ml.html
Source file common.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
open Devkit open ExtLib exception Slack_lib_error of string let slack_lib_fail fmt = Printf.ksprintf (fun e -> raise (Slack_lib_error e)) fmt let http_request ?ua ?headers ?body meth path = match%lwt Web.http_request_lwt ?ua ~verbose:true ?headers ?body meth path with | `Ok s -> Lwt.return_ok s | `Error e -> Lwt.return_error e let get_local_file path = try Std.input_file path with exn -> slack_lib_fail "unable to get local file from %s because:\n%s" path (Exn.to_string exn) let get_local_file_with ~f path = f @@ get_local_file path let get_sorted_files_from dir = let files = Sys.readdir dir in Array.sort String.compare files; Array.to_list files let sign_string_sha256 ~key ~basestring = Cstruct.of_string basestring |> Nocrypto.Hash.SHA256.hmac ~key:(Cstruct.of_string key) |> Hex.of_cstruct |> Hex.show
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>