Giter Site home page Giter Site logo

zulip-java-rest's People

Contributors

dependabot[bot] avatar kamudadreieck avatar ralaaaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

zulip-java-rest's Issues

Readme missing variable name when creating executor

In the readme, shouldn't the line
ZulipRestExecutor = new ZulipRestExecutor("[email protected]", "apikey","https://zulip.example.com/");
have the variable name executor so it would actually be
ZulipRestExecutor executor = new ZulipRestExecutor("[email protected]", "apikey","https://zulip.example.com/");
?

Also, is there an import needed?

When I compile this code on https://repl.it/languages/java10 after installing the io.taliox:zulip-java-rest package it gives this terminal output.
Code:

class Main {
  public static void main(String[] args) {
    ZulipRestExecutor executor = new ZulipRestExecutor("[email protected]", "apikey","https://zulip.example.com/");
  }
}

Terminal output:

 javac -classpath .:/run_dir/junit-4.12.jar:target/dependency/* -d . Main.java
Main.java:3: error: cannot find symbol
    ZulipRestExecutor executor = new ZulipRestExecutor("[email protected]", "apikey","https://z
ulip.example.com/");
    ^
  symbol:   class ZulipRestExecutor
  location: class Main
Main.java:3: error: cannot find symbol
    ZulipRestExecutor executor = new ZulipRestExecutor("[email protected]", "apikey","https://z
ulip.example.com/");
                                     ^
  symbol:   class ZulipRestExecutor
  location: class Main
2 errors
compiler exit status 1


Delete and rename?

Hey , is there a delete Stream and rename stream function because i can't seem to find it .

Also im struggling a bit like i want to subscribe a user to a stream and i am trying this code
PostSubscription subscribe = new PostSubscription("[{"name":"A new Stream"}]");

    subscribe.setInvite_only(true);
    subscribe.setPrincipals("[email protected]");
    executor.executeCall(subscribe);

And im getting an error , would u mind help me out? Thanks in advance.

It seems can not Reuse the HttpClient instance

for (int i = 1; i < 6; i++) {
			ZulipRestExecutor  executor = new ZulipRestExecutor(user, apikey,zuliphost);
			postMessage.setTo("user0" + i + "@myzulip.com");
			postMessage.setContent("loop " + i + "hello , current time is " + getNowTime());
			String response2 = executor.executeCall(postMessage);
			System.out.println(response2);
		}

will work, but it not reuse the HttpClient instance

ZulipRestExecutor  executor = new ZulipRestExecutor(user, apikey,zuliphost);
for (int i = 1; i < 6; i++) {
			postMessage.setTo("user0" + i + "@myzulip.com");
			postMessage.setContent("loop " + i + "hello , current time is " + getNowTime());
			String response2 = executor.executeCall(postMessage);
			System.out.println(response2);
		}

this will not work, it stuck after loop 2 times

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.