OCaml client for the LinkedIn Voyager API
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

*: migrate consumers from nox-xdge / dune-internal xdg to nox-xdg{,.eio}

Sweep of every consumer that previously depended on either the
standalone [nox-xdge] package (the Eio wrapper) or dune's internal
[xdg] library. Both are gone after the previous commit; consumers
now point at the merged [nox-xdg] package's two libraries:

- Code that used the Eio wrapper ([Xdge.v fs app_name],
[Xdge.config_dir], etc.) -> [Xdg_eio.foo], library [nox-xdg.eio].
- Code that used the pure spec ([Xdg.create ~env ()],
[Xdg.cache_dir]) -> unchanged module name [Xdg], library
[nox-xdg].

Touched packages:

- gauth, gdocs, gsheets, gslides -- the Google credential stack;
[Gauth.Local_store] uses [Xdg_eio] internally.
- ocaml-requests, ocaml-cookie -- HTTP client and cookie jar;
[Requests.t] takes an [?xdg:Xdg_eio.t] for cookie persistence.
- ocaml-agent, ocaml-atp, ocaml-slack, ocaml-linkedin, monopam,
uniboot -- CLIs that compute their own config / cache / state
paths via the Eio wrapper.
- ocaml-oci -- uses the pure spec ([Xdg.cache_dir]) for OCI image
layout; migrated from dune-internal [xdg] to [nox-xdg].

Mechanical changes per package:

- [dune-project]: opam dep [nox-xdge] -> [nox-xdg].
- [lib/dune] and [bin/dune]: library reference [nox-xdge] ->
[nox-xdg.eio] (or [nox-xdg] for the rare pure-spec consumer).
- [.ml] / [.mli]: [Xdge] -> [Xdg_eio].

Generated [.opam] files updated by the dune build accordingly.

+8 -8
+3 -3
bin/cli.ml
··· 52 52 export LINKEDIN_LI_AT="<li_at value>" 53 53 export LINKEDIN_JSESSIONID="<JSESSIONID value>"|} 54 54 55 - let cookies_path xdg = Eio.Path.(Xdge.data_dir xdg / "cookies") 55 + let cookies_path xdg = Eio.Path.(Xdg_eio.data_dir xdg / "cookies") 56 56 57 57 let save_cookies xdg ~li_at ~jsessionid = 58 58 let path = cookies_path xdg in ··· 75 75 | Some a, Some j -> (a, j, []) 76 76 | _ -> ( 77 77 let fs = Eio.Stdenv.fs env in 78 - let xdg = Xdge.v fs "linkedin" in 78 + let xdg = Xdg_eio.v fs "linkedin" in 79 79 match (li_at, jsessionid, load_cookies xdg) with 80 80 | None, None, Some (a, j) -> (a, j, []) 81 81 | Some a, None, Some (_, j) -> (a, j, []) ··· 124 124 let save_cookies_from_chrome env = 125 125 let proc_mgr = Eio.Stdenv.process_mgr env in 126 126 let fs = Eio.Stdenv.fs env in 127 - let xdg = Xdge.v fs "linkedin" in 127 + let xdg = Xdg_eio.v fs "linkedin" in 128 128 match Linkedin.Chrome_cookies.linkedin_cookies proc_mgr fs with 129 129 | Ok (li_at, jsessionid) -> 130 130 save_cookies xdg ~li_at ~jsessionid;
+2 -2
bin/cmd_logout.ml
··· 7 7 let run () () = 8 8 Cli.run @@ fun ~sw:_ env -> 9 9 let fs = Eio.Stdenv.fs env in 10 - let xdg = Xdge.v fs "linkedin" in 11 - let path = Eio.Path.(Xdge.data_dir xdg / "cookies") in 10 + let xdg = Xdg_eio.v fs "linkedin" in 11 + let path = Eio.Path.(Xdg_eio.data_dir xdg / "cookies") in 12 12 match Eio.Path.unlink path with 13 13 | () -> 14 14 Fmt.pr "Logged out. %s@."
+1 -1
bin/dune
··· 10 10 vlog 11 11 nox-tty 12 12 monopam-info 13 - nox-xdge)) 13 + nox-xdg.eio))
+1 -1
dune-project
··· 38 38 monopam-info 39 39 nox-tty 40 40 vlog 41 - nox-xdge 41 + nox-xdg 42 42 (mdx :with-test) 43 43 (alcotest :with-test)))
+1 -1
linkedin.opam
··· 29 29 "monopam-info" 30 30 "nox-tty" 31 31 "vlog" 32 - "nox-xdge" 32 + "nox-xdg" 33 33 "mdx" {with-test} 34 34 "alcotest" {with-test} 35 35 "odoc" {with-doc}