{"id":18863595,"url":"https://github.com/neiljbrown/brighttalk-channel-reporting-api-client","last_synced_at":"2025-04-14T13:06:49.839Z","repository":{"id":25721147,"uuid":"29158118","full_name":"neiljbrown/brighttalk-channel-reporting-api-client","owner":"neiljbrown","description":"Java implementation of API client for BrightTALK's Channel owner reporting APIs. NOTE: This repo is frozen. All further development of the API client will take place in the BrightTALK repo:","archived":false,"fork":false,"pushed_at":"2015-05-12T12:41:35.000Z","size":434,"stargazers_count":4,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:11:23.756Z","etag":null,"topics":["api","rest","rest-api"],"latest_commit_sha":null,"homepage":"https://github.com/brighttalk","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neiljbrown.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-12T21:35:19.000Z","updated_at":"2023-02-27T17:48:39.000Z","dependencies_parsed_at":"2022-08-24T14:13:13.872Z","dependency_job_id":null,"html_url":"https://github.com/neiljbrown/brighttalk-channel-reporting-api-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fbrighttalk-channel-reporting-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fbrighttalk-channel-reporting-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fbrighttalk-channel-reporting-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fbrighttalk-channel-reporting-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neiljbrown","download_url":"https://codeload.github.com/neiljbrown/brighttalk-channel-reporting-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886314,"owners_count":21177643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","rest","rest-api"],"created_at":"2024-11-08T04:37:57.640Z","updated_at":"2025-04-14T13:06:49.288Z","avatar_url":"https://github.com/neiljbrown.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BrightTALK Channel Owner Reporting API Client\n\n[![Build Status](https://travis-ci.org/neiljbrown/brighttalk-channel-reporting-api-client.svg?branch=master)](https://travis-ci.org/neiljbrown/brighttalk-channel-reporting-api-client)\n\n## Project Status \nThis project is frozen. For the latest version of the reporting API client please consult the [BrightTALK  \nGithub project repository](https://github.com/BrightTALK/brighttalk-channel-reporting-api-client).   \n\n## Overview\nThis project contains the source code and releases of an API client for [BrightTALK's](https://www.brighttalk.com/) \nChannel Owner Reporting API.\n\nThe API client is specified in Java. A production-ready implementation, built using the Spring framework, is also \nprovided.  \n\nThe source code is made available under the [Apache License 2.0](http://en.wikipedia.org/wiki/Apache_License). \n\n## Downloads\nA 'binary' distribution of the API client is available for [download](https://github.com/neiljbrown/brighttalk-channel-reporting-api-client/releases) in both tar.gz and zip formats, for each release. The distribution includes a classses JAR, supporting \nsource and javadoc JARs, and the necessary configuration files.   \n  \nThe JAR files are _not_ currently published to a public repository. Support for this will be added in the future, with a \nview to streamlining your build process.   \n\n## Building from source\nIf you prefer to build the API client yourself, both Maven and Gradle build scripts are provided. See the pom.xml and \nbuild.gradle files in the project's root folder.\n\n## Runtime Dependencies\nThe API client requires a _minimum_ Java runtime (JRE) version of Java 7. (The API client is written in Java 7 rather \nthan a more recent Java version with a view to supporting a larger install base).\n\nThe API client also depends on the following _minimum_ versions of third-party libraries being present on the \nclasspath: \n\n* com.google.guava:guava:16.0.1\n* org.slf4j:slf4j-api:1.7.7\n* org.springframework:spring-context:4.0.6.RELEASE\n* org.springframework:spring-oxm:4.0.6.RELEASE \n* org.springframework:spring-web:4.0.6.RELEASE\n* org.apache.httpcomponents:httpclient:4.3.3\n \nIf you wish to enable the logging provided by the API client you'll additionally need to add the SLF4J \"binding\" JAR for \nyour chosen logging framework. For more details see the [SLF4J user manual](http://www.slf4j.org/manual.html). For \nexample, to use the native SLF4J binding logback, add the following to your classpath:\n\n* ch.qos.logback:logback-classic:1.1.2  \n\n## API Docs\nIf you wish to familiarise yourself with the code, good places to start are the Javadoc for the [ApiClient] interface \nand its Spring implementation [SpringApiClientImpl]. (Javadoc is currently included in the binary distribution. It \nwill be made available online in the future).\n\n## Automated Tests\nUnit tests are implemented in JUnit (4) and Hamcrest and can be found in the project's src/test/java folder.\n\nThe Spring implementation of the API client has an extensive set of integration tests. See class \nSpringApiClientIntegrationTest. These tests use the \n[Spring MVC Test framework](http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#spring-mvc-test-framework) \nto exercise the API client end-to-end against a mock implementation of the API service, including loading the Spring \napplication context and unmarshalling of canned API responses.\n\nThe Spring implementation also has an additional set of integrations tests which serve to test the production \nimplementation of the API client's underlying HTTP client in conjunction with a stubbed API server (implemented using \n[WireMock](http://wiremock.org/)). See class SpringApiClientImplStubbedApiServiceIntegrationTest.     \n\n## Getting Started\nThis section outlines the steps to use the Spring implementation of the API client for the first time in your Java \napplication, after you've downloaded the binaries or built the client from source.\n\n1) Extend your application's build script to declare a compile-time dependency on the API client JAR - \nbrighttalk-channel-reporting-api-client-{release}.jar. Also add the API client's runtime dependencies (see above).\n\n2) Configure the API client for each of your environments (e.g. stage and production) by creating environment specific \nproperty files, following the naming convention brighttalk-channel-reporting-api-client-{environment}.properties, in a \nfolder (e.g. src/main/resources) that will get deployed with your app and included on the classpath. Example property \nfiles are included in the binary distribution of the project.\n\n3) Tailor the API client environment specific properties. Currently, the only essential change you need to make \nis to re-configure the API credentials for your BrightTALK Channel(s), by setting the value of the `apiUser.*` properties. \n(These credentials can be obtained from \u003csupport@brighttalk.com\u003e). \n\n4) Releases of the API client ship with Spring bean config that includes a fully configured, singleton instance of the \nSpring implementation of the API client for use. The Spring bean configuration is Java-based (`@Configuration`), \nimplemented in class .spring.AppConfig. To make the API client available for auto-wiring in your own (e.g. DAO) class \nyou'll need to import the `@Bean` configured in AppConfig.\n\nIf your application uses Java-based Spring bean config, use Spring's `@Import` annotation on one of your `@Configuration` \nclasses, e.g. \n\n\u003cpre\u003e\n  @Configuration  \n  // Include beans packaged with BrightTALK reporting API client, to get a fully configured instance of ApiClient  \n  @Import(com.neiljbrown.brighttalk.channels.reportingapi.client.spring.AppConfig.class)  \n  ...  \n  public class IntegrationConfig {  \n    ...  \n  }\n\u003c/pre\u003e\n\nIf your application uses Spring XML bean config, you can enable processing of Spring annotations using the \u003ctt\u003e\u0026lt;context:annotation-config/\u003e\u003c/tt\u003e element and include the shipped `@Configuration` class in your Spring XML, e.g.\n\u003cpre\u003e\n\u0026lt;!-- One of your Spring bean XML files, e.g. integration-config.xml --\u003e\n\u0026lt;beans\u003e\n  ...\n  \u0026lt;!-- Enable processing of Spring annotations such as @Configuration --\u003e\n  \u0026lt;context:annotation-config/\u003e\n  \u0026lt;!-- Include beans packaged with BrightTALK reporting API client, to get a fully configured instance of ApiClient --\u003e\n  \u0026lt;bean class=\"com.neiljbrown.brighttalk.channels.reportingapi.client.spring.AppConfig\"/\u003e  \n  ...\n\u0026lt;/beans\u003e\n\u003c/pre\u003e\n\nFor more details of the mechanisms for consuming the packaged `@Bean` configuration see the \n[Spring reference manual, section 'Composing Java-based configurations'](http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-java-composing-configuration-classes).\n\n5) If you wish to enable the logging provided by the Spring implementation of the API client then, in addition to \nadding the necessary runtime dependency for SLF4J (see above), you'll need to extend the logging configuration for your \nchosen logging framework. To assist with this, the API client ships with an example configuration for the Logback \nlogging framework, which identifies the relevant loggers. See src/main/resources/logback-template.xml. \n\nHaving completed the above steps you're now ready to inject the API client into your application class, e.g. \n\u003cpre\u003e\n@Repository\npublic class BrightTalkChannelReportsDaoImpl implements BrightTalkChannelReportsDao {\n\n  ...\n  private ApiClient apiClient;\n  ...\n\n  @Autowired\n  public BrightTalkChannelReportsDaoImpl(ApiClient apiClient) {\n    this.apiClient = apiClient;\n  }\n  \n  ...\n}\n\u003c/pre\u003e\n\n6) When running your app, specify the name of the environment which the API client should use for configuration \npurposes, by setting JVM system property 'environment' to the environment name used in the API client property file, \ne.g. \n\u003cpre\u003ejava -Denvironment=qa ...\u003c/pre\u003e \nIf not specified, the environment will default to 'dev'.\n\nGood luck with building your BrightTALK reporting integration. \n   \n--    \nNeil Brown.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneiljbrown%2Fbrighttalk-channel-reporting-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneiljbrown%2Fbrighttalk-channel-reporting-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneiljbrown%2Fbrighttalk-channel-reporting-api-client/lists"}