I have a java package com.example.Api
I have included it in my project.clj
I have imported it:
(ns prismic-clojure.core
(:import [com.example.Api])
(:gen-class))
There is a static 'get' function which, in Java, I would access like:
Api api = Api.get("https://my.company.io/api", "secret-token");
The java function is defined as:
public static Api get(String url, String accessToken)
I have tried this:
(def api (. get Api "https://my.company.io/api" "secret-token") )
Charles Duffy
300k43 gold badges442 silver badges498 bronze badges
1 Answer 1
This is how you call a static function on the Api class:
(Api/get "https://my.company.io/api" "secret-token")
answered Jan 25, 2018 at 17:52
Taylor Wood
16.2k1 gold badge24 silver badges38 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-clj
Apiinstance. What's the calling convention for the constructor for that class?