Skip to content

Commit

Permalink
Release 3.0.1 (#153)
Browse files Browse the repository at this point in the history
* Update dev branch to 3.0.1 development (#150)

* Update version post 3.0.0 release

* Update travis URL

* TEC-15066 enable showcase as organisations for OrganizationConnection.retrieveOrganizationFollowerCount and OrgnizationConnection. retrieveShareStatistics (#152)

* TEC-15066 enable retrieveOrganizationFollowerCount and retrieveShareStatistics to request for showcase pages

* TEC-15066 Update CHANGELOG.md

* TEC-15066 Update readme

Co-authored-by: David Ashton <[email protected]>
  • Loading branch information
diepjy and djjashton authored Dec 7, 2021
1 parent 1a48168 commit 1618317
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@ sorted by creation date.
## 3.0.0 (October 19, 2021)
* Change `OrganizationConnection.fetchMemberOrganizationAccessControl` and `OrganizationConnection.findOrganizationAccessControl`
to use `/OrganizationAcls` endpoint instead of `/OrganizationalEntityAcls` endpoint as the LinkedIn API will remove support for organisation entity ACLs and replace it with organisation ACLs on October 30, 2021.

## 3.0.1 (Dec 2, 2021)
* Ensure `OrganizationConnection.retrieveOrganizationFollowerCount` and `OrgnizationConnection. retrieveShareStatistics`
can get data for both organization and organization brand pages.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ use:
<dependency>
<groupId>com.echobox</groupId>
<artifactId>ebx-linkedin-sdk</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</dependency>
```

## Installation (Most Up To Date)
[![Build Status](https://travis-ci.org/ebx/ebx-linkedin-sdk.svg?branch=dev)](https://travis-ci.org/ebx/ebx-linkedin-sdk)
[![Build Status](https://travis-ci.org/ebx/ebx-linkedin-sdk.svg?branch=dev)](https://app.travis-ci.com/github/ebx/ebx-linkedin-sdk)

If you'd like to use the latest SNAPSHOT build please ensure you have snapshots enabled in your pom:

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>com.echobox</groupId>
<artifactId>ebx-linkedin-sdk</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<packaging>jar</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public List<Organization> findOrganizationByEmailDomain(String emailDomain, Para
* @return the number of followers for the organization
*/
public Long retrieveOrganizationFollowerCount(URN organizationURN) {
validateOrganizationURN("organizationURN", organizationURN);
validateOrganizationOrBrandURN("organizationURN", organizationURN);
NetworkSize networkSize = linkedinClient.fetchObject(NETWORK_SIZES + "/" + organizationURN,
NetworkSize.class, Parameter.with(EDGE_TYPE, COMPANY_FOLLOWED_BY_MEMEBER));
return networkSize.getFirstDegreeSize();
Expand Down Expand Up @@ -395,7 +395,7 @@ public List<Statistics.BrandStatistics> retrieveOrganizationBrandPageStatistics(
*/
public List<ShareStatistic> retrieveShareStatistics(URN organizationURN,
TimeInterval timeInterval, List<URN> shareURNs, Integer count) {
validateOrganizationURN("organizationURN", organizationURN);
validateOrganizationOrBrandURN("organizationURN", organizationURN);

List<Parameter> params = new ArrayList<>();
params.add(Parameter.with(QUERY_KEY, ORGANIZATIONAL_ENTITY_KEY));
Expand All @@ -412,6 +412,15 @@ public List<ShareStatistic> retrieveShareStatistics(URN organizationURN,
return getListFromQuery(SHARE_STATISTICS, ShareStatistic.class,
params.toArray(new Parameter[0]));
}

private void validateOrganizationOrBrandURN(String paramName, URN organizationOrBrandURN) {
ValidationUtils.verifyParameterPresence(paramName, organizationOrBrandURN);
if (!(URNEntityType.ORGANIZATION.equals(organizationOrBrandURN.resolveURNEntityType())
|| URNEntityType.ORGANIZATIONBRAND.equals(organizationOrBrandURN.resolveURNEntityType()))) {
throw new IllegalArgumentException(String.format("The URN should be type %s or %s",
URNEntityType.ORGANIZATION, URNEntityType.ORGANIZATIONBRAND));
}
}

private void validateOrganizationURN(String paramName, URN organizationURN) {
validateURN(paramName, organizationURN, URNEntityType.ORGANIZATION);
Expand Down

0 comments on commit 1618317

Please sign in to comment.