Browse Source

Test kma_getStatus

master
Dendy 3 months ago
parent
commit
22ee8c7e80
  1. 0
      .gitignore
  2. 0
      .gitmodules
  3. 13
      Makefile
  4. 2
      libkenoma
  5. 15
      src/main.c

0
.gitignore

0
.gitmodules

13
Makefile

@ -6,21 +6,20 @@ TARGET = kenocli
SRCDIR = src
SOURCES = $(shell find src -type f -iname '*.c')
all: $(LIBKENOMA_SO) $(TARGET)
$(TARGET): $(SOURCES)
$(MAKE) -C $(LIBKENOMA_DIR)
$(CC) $(CFLAGS) -o $@ $(SOURCES)
#.PHONY: $(LIBKENOMA_SO)
#
#$(LIBKENOMA_SO):
# $(MAKE) -C $(LIBKENOMA_DIR)
.PHONY: $(LIBKENOMA_SO)
$(LIBKENOMA_SO):
$(MAKE) -C $(LIBKENOMA_DIR)
.PHONY: run
run: $(TARGET)
run: all
./$(TARGET)
.PHONY: clean
clean:
rm -rf $(TARGET)

2
libkenoma

@ -1 +1 @@
Subproject commit 9516a271206a4d93f7b06b501eef90ec136b29d1
Subproject commit 3ecbcb8a6a6a458d57af6def0a66fe600455c00e

15
src/main.c

@ -31,7 +31,20 @@ int main(void)
printf("kma_verifyConn Succesful? -> %s\n", succ ? "yes" : "no");
kma_postStatus(conn, "Test with spaces! and other chars ;3;");
//kma_postStatus(conn, "Test with spaces! and other chars ;3;");
kma_status *status = kma_getStatus(conn, "ABAKGUCcLW3gcaxVBo");
if (status) {
printf("\nRetrieved post:\n\"%s\"\n", status->content);
printf(
"%d boosts | %d favs | %d replies | posted at: %s\n",
status->reblogs_count,
status->favourites_count,
status->replies_count,
status->created_at
);
}
kma_destroyStatus(status);
kma_destroyConn(conn);
return 0;
}

Loading…
Cancel
Save