diff --git a/Documentation/Integration.md b/Documentation/Integration.md index 5a5dce72b..e2e56173b 100644 --- a/Documentation/Integration.md +++ b/Documentation/Integration.md @@ -101,7 +101,7 @@ Auth Extensions are located in the [extensions/auth module](https://github.com/g 3. Create the test directory for the FooAuthDataGeneratorTest - * `$mkdir -p extensions/auth/portability-auth-instagram/src/test/java/org/datatransferproject/auth/foo` + * `$mkdir -p extensions/auth/portability-auth-foo/src/test/java/org/datatransferproject/auth/foo` 4. Create FooAuthDataGeneratorTest with appropriate tests diff --git a/Documentation/JettyApiSpec.yaml b/Documentation/JettyApiSpec.yaml index 6615035ea..b9b2088c7 100644 --- a/Documentation/JettyApiSpec.yaml +++ b/Documentation/JettyApiSpec.yaml @@ -250,7 +250,6 @@ components: transferDataType: "PHOTOS" exportServices: - "Flickr" - - "Instagram" - "SmugMug" - "Facebook" - "Twitter" diff --git a/Documentation/Keys.md b/Documentation/Keys.md index 6b4594d9e..5e5c98f20 100644 --- a/Documentation/Keys.md +++ b/Documentation/Keys.md @@ -29,7 +29,6 @@ authorization technology each providers uses. - [Flickr](../extensions/data-transfer/portability-data-transfer-flickr#keys--auth) - [Google](../extensions/data-transfer/portability-data-transfer-google#keys--auth) - [Imgur](../extensions/data-transfer/portability-data-transfer-imgur#keys--auth) - - [Instagram](../extensions/data-transfer/portability-data-transfer-instagram#keys--auth) - [Microsoft](../extensions/data-transfer/portability-data-transfer-microsoft#keys--auth) - [Remember The Milk](../extensions/data-transfer/portability-data-transfer-rememberthemilk#keys--auth) - [SmugMug](../extensions/data-transfer/portability-data-transfer-smugmug#keys--auth) diff --git a/distributions/demo-google-deployment/api/build.gradle b/distributions/demo-google-deployment/api/build.gradle index 6a9de8d9b..740db9784 100644 --- a/distributions/demo-google-deployment/api/build.gradle +++ b/distributions/demo-google-deployment/api/build.gradle @@ -62,7 +62,6 @@ dependencies { compile project(':extensions:auth:portability-auth-google') compile project(':extensions:auth:portability-auth-flickr') compile project(':extensions:auth:portability-auth-rememberthemilk') - compile project(':extensions:auth:portability-auth-instagram') compile project(':extensions:auth:portability-auth-smugmug') compile project(':extensions:auth:portability-auth-spotify') compile project(':extensions:auth:portability-auth-facebook') diff --git a/distributions/demo-google-deployment/bin/encrypt_and_upload_secrets.sh b/distributions/demo-google-deployment/bin/encrypt_and_upload_secrets.sh index 3cbb479e1..98c7f2009 100755 --- a/distributions/demo-google-deployment/bin/encrypt_and_upload_secrets.sh +++ b/distributions/demo-google-deployment/bin/encrypt_and_upload_secrets.sh @@ -106,7 +106,6 @@ if [[ ! -e $ENCRYPTED_SECRETS_DIR ]]; then # TODO: Make this list configurable encrypt_secret "FLICKR" encrypt_secret "GOOGLE" - encrypt_secret "INSTAGRAM" encrypt_secret "MICROSOFT" encrypt_secret "RTM" encrypt_secret "SHUTTERSTOCK" diff --git a/distributions/demo-google-deployment/transfer/build.gradle b/distributions/demo-google-deployment/transfer/build.gradle index 16a40442d..8b3d1988c 100644 --- a/distributions/demo-google-deployment/transfer/build.gradle +++ b/distributions/demo-google-deployment/transfer/build.gradle @@ -59,7 +59,6 @@ dependencies { // TODO: depend on these based on list in flag values. compile project(':extensions:data-transfer:portability-data-transfer-deezer') compile project(':extensions:data-transfer:portability-data-transfer-google') - compile project(':extensions:data-transfer:portability-data-transfer-instagram') compile project(':extensions:data-transfer:portability-data-transfer-microsoft') compile project(':extensions:data-transfer:portability-data-transfer-flickr') compile project(':extensions:data-transfer:portability-data-transfer-rememberthemilk') diff --git a/distributions/demo-server/build.gradle b/distributions/demo-server/build.gradle index f8623d42e..7482bee19 100644 --- a/distributions/demo-server/build.gradle +++ b/distributions/demo-server/build.gradle @@ -75,7 +75,6 @@ dependencies { compile project(':extensions:auth:portability-auth-deezer') compile project(':extensions:auth:portability-auth-flickr') compile project(':extensions:auth:portability-auth-google') - compile project(':extensions:auth:portability-auth-instagram') compile project(':extensions:auth:portability-auth-facebook') compile project(':extensions:auth:portability-auth-microsoft') compile project(':extensions:auth:portability-auth-rememberthemilk') @@ -91,7 +90,6 @@ dependencies { compile project(':extensions:data-transfer:portability-data-transfer-deezer') compile project(':extensions:data-transfer:portability-data-transfer-flickr') compile project(':extensions:data-transfer:portability-data-transfer-google') - compile project(':extensions:data-transfer:portability-data-transfer-instagram') compile project(':extensions:data-transfer:portability-data-transfer-facebook') compile project(':extensions:data-transfer:portability-data-transfer-microsoft') compile project(':extensions:data-transfer:portability-data-transfer-rememberthemilk') diff --git a/distributions/demo-server/env.secrets.template b/distributions/demo-server/env.secrets.template index b3ccaa752..f7c506277 100644 --- a/distributions/demo-server/env.secrets.template +++ b/distributions/demo-server/env.secrets.template @@ -17,10 +17,6 @@ IMGUR_SECRET= FLICKR_KEY= FLICKR_SECRET= -# See https://github.com/google/data-transfer-project/blob/master/extensions/data-transfer/portability-data-transfer-instagram#keys--auth -INSTAGRAM_KEY= -INSTAGRAM_SECRET= - # See https://github.com/google/data-transfer-project/blob/master/extensions/data-transfer/portability-data-transfer-rememberthemilk#keys--auth RTM_KEY= RTM_SECRET= diff --git a/extensions/auth/portability-auth-instagram/build.gradle b/extensions/auth/portability-auth-instagram/build.gradle deleted file mode 100644 index 006853bb5..000000000 --- a/extensions/auth/portability-auth-instagram/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -plugins { - id 'maven' - id 'signing' -} - -dependencies { - compile project(':portability-spi-api') - compile project(':portability-spi-cloud') - compile project(':libraries:auth') - - compile("com.google.oauth-client:google-oauth-client:${googleApiClient}") - compile "com.google.http-client:google-http-client-jackson2:${googleHttpClientVersion}" -} - - -configurePublication(project) diff --git a/extensions/auth/portability-auth-instagram/src/main/java/org/datatransferproject/auth/instagram/InstagramAuthServiceExtension.java b/extensions/auth/portability-auth-instagram/src/main/java/org/datatransferproject/auth/instagram/InstagramAuthServiceExtension.java deleted file mode 100644 index 502df7680..000000000 --- a/extensions/auth/portability-auth-instagram/src/main/java/org/datatransferproject/auth/instagram/InstagramAuthServiceExtension.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.datatransferproject.auth.instagram; - -import org.datatransferproject.auth.OAuth2ServiceExtension; -import org.datatransferproject.spi.api.auth.extension.AuthServiceExtension; - -/** - * An {@link AuthServiceExtension} providing an authentication mechanism for Instagram services. - */ -public class InstagramAuthServiceExtension extends OAuth2ServiceExtension { - - public InstagramAuthServiceExtension() { - super(new InstagramOAuthConfig()); - } - -} diff --git a/extensions/auth/portability-auth-instagram/src/main/java/org/datatransferproject/auth/instagram/InstagramOAuthConfig.java b/extensions/auth/portability-auth-instagram/src/main/java/org/datatransferproject/auth/instagram/InstagramOAuthConfig.java deleted file mode 100644 index 9ca4ca348..000000000 --- a/extensions/auth/portability-auth-instagram/src/main/java/org/datatransferproject/auth/instagram/InstagramOAuthConfig.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.datatransferproject.auth.instagram; - -import static org.datatransferproject.types.common.models.DataVertical.PHOTOS; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import java.util.Map; -import java.util.Set; -import org.datatransferproject.auth.OAuth2Config; -import org.datatransferproject.types.common.models.DataVertical; - -/** - * Class that provides Instagram-specific information for OAuth2 - */ -public class InstagramOAuthConfig implements OAuth2Config { - - // https://www.instagram.com/developer/authentication/ - - @Override - public String getServiceName() { - return "Instagram"; - } - - @Override - public String getAuthUrl() { - return "https://api.instagram.com/oauth/authorize"; - } - - @Override - public String getTokenUrl() { - return "https://api.instagram.com/oauth/access_token"; - } - - // See https://www.instagram.com/developer/authorization/ - @Override - public Map> getExportScopes() { - return ImmutableMap.of(PHOTOS, ImmutableSet.of("basic")); - } - - // Instagram does not provide an API for import; https://help.instagram.com/442418472487929 - @Override - public Map> getImportScopes() { - return ImmutableMap.of(); - } -} diff --git a/extensions/auth/portability-auth-instagram/src/main/resources/META-INF/services/org.datatransferproject.spi.api.auth.extension.AuthServiceExtension b/extensions/auth/portability-auth-instagram/src/main/resources/META-INF/services/org.datatransferproject.spi.api.auth.extension.AuthServiceExtension deleted file mode 100644 index 9c10a1faf..000000000 --- a/extensions/auth/portability-auth-instagram/src/main/resources/META-INF/services/org.datatransferproject.spi.api.auth.extension.AuthServiceExtension +++ /dev/null @@ -1 +0,0 @@ -org.datatransferproject.auth.instagram.InstagramAuthServiceExtension diff --git a/extensions/data-transfer/portability-data-transfer-instagram/Readme.md b/extensions/data-transfer/portability-data-transfer-instagram/Readme.md deleted file mode 100644 index 4e4ca9473..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/Readme.md +++ /dev/null @@ -1,23 +0,0 @@ -# Instagram -This folder contains the extension implementation for the -[Instagram](https://www.instagram.com) service. - -## Data Supported - - - [Photos](src/main/java/org/datatransferproject/datatransfer/instagram/photos) Export only, no import. - -## Current State -No known issues, however like much of DTP still needs some in depth testing to ensure corner -cases are working. - -## Keys - -Apply for a key at [www.instagram.com/developer](https://www.instagram.com/developer/) - -Google uses OAuth 2 for authorization. - -## Maintained By - -The Instagram extension was created by the -[DTP maintainers](mailto:portability-maintainers@googlegroups.com) -and is not an official product of Instagram/Facebook. diff --git a/extensions/data-transfer/portability-data-transfer-instagram/build.gradle b/extensions/data-transfer/portability-data-transfer-instagram/build.gradle deleted file mode 100644 index b2dd3edc3..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -plugins { - id 'maven' - id 'signing' -} - -dependencies { - compile project(':portability-spi-cloud') - compile project(':portability-spi-transfer') - - compile("com.google.api-client:google-api-client:${googleApiClient}") -} - -configurePublication(project) diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/InstagramTransferExtension.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/InstagramTransferExtension.java deleted file mode 100644 index e18de3132..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/InstagramTransferExtension.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.datatransferproject.transfer.instagram; - -import static org.datatransferproject.types.common.models.DataVertical.PHOTOS; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.api.client.http.HttpTransport; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableList; -import org.datatransferproject.api.launcher.ExtensionContext; -import org.datatransferproject.api.launcher.Monitor; -import org.datatransferproject.types.common.models.DataVertical; -import org.datatransferproject.spi.transfer.extension.TransferExtension; -import org.datatransferproject.spi.transfer.provider.Exporter; -import org.datatransferproject.spi.transfer.provider.Importer; -import org.datatransferproject.transfer.instagram.photos.InstagramPhotoExporter; -import org.datatransferproject.types.common.models.photos.PhotosContainerResource; -import org.datatransferproject.types.transfer.auth.TokensAndUrlAuthData; - - -public class InstagramTransferExtension implements TransferExtension { - private static final ImmutableList SUPPORTED_DATA_TYPES = ImmutableList.of(PHOTOS); - - private Exporter exporter; - - private boolean initialized = false; - - @Override - public String getServiceId() { - return "instagram"; - } - - @Override - public Exporter getExporter(DataVertical transferDataType) { - Preconditions.checkArgument( - initialized, "InstagramTransferExtension not initialized. Unable to get Exporter"); - Preconditions.checkArgument(SUPPORTED_DATA_TYPES.contains(transferDataType)); - return exporter; - } - - @Override - public Importer getImporter(DataVertical transferDataType) { - Preconditions.checkArgument( - initialized, "InstagramTransferExtension not initialized. Unable to get Importer"); - Preconditions.checkArgument(false, "Instagram does not support import"); - return null; - } - - @Override - public void initialize(ExtensionContext context) { - if (initialized) { - Monitor monitor = context.getMonitor(); - monitor.severe(() -> "InstagramTransferExtension already initialized"); - return; - } - - ObjectMapper mapper = - new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - - HttpTransport httpTransport = context.getService(HttpTransport.class); - exporter = new InstagramPhotoExporter(mapper, httpTransport); - initialized = true; - } -} diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/InstagramPhotoExporter.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/InstagramPhotoExporter.java deleted file mode 100644 index f906ab28e..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/InstagramPhotoExporter.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.datatransferproject.transfer.instagram.photos; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.api.client.http.GenericUrl; -import com.google.api.client.http.HttpRequest; -import com.google.api.client.http.HttpRequestFactory; -import com.google.api.client.http.HttpResponse; -import com.google.api.client.http.HttpTransport; -import com.google.common.base.Preconditions; -import com.google.common.io.CharStreams; -import org.datatransferproject.spi.transfer.provider.ExportResult; -import org.datatransferproject.spi.transfer.provider.ExportResult.ResultType; -import org.datatransferproject.spi.transfer.provider.Exporter; -import org.datatransferproject.types.common.ExportInformation; -import org.datatransferproject.types.common.PaginationData; -import org.datatransferproject.transfer.instagram.photos.model.MediaFeedData; -import org.datatransferproject.transfer.instagram.photos.model.MediaResponse; -import org.datatransferproject.types.transfer.auth.TokensAndUrlAuthData; -import org.datatransferproject.types.common.models.photos.PhotoAlbum; -import org.datatransferproject.types.common.models.photos.PhotoModel; -import org.datatransferproject.types.common.models.photos.PhotosContainerResource; - -import java.io.IOException; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.UUID; - -public class InstagramPhotoExporter implements - Exporter { - - private static final String MEDIA_URL = "https://api.instagram.com/v1/users/self/media/recent"; - private static final String FAKE_ALBUM_ID = "instagramAlbum"; - - private final ObjectMapper objectMapper; - private final HttpTransport httpTransport; - - public InstagramPhotoExporter(ObjectMapper objectMapper, HttpTransport httpTransport) { - this.objectMapper = objectMapper; - this.httpTransport = httpTransport; - } - - @Override - public ExportResult export(UUID jobId, TokensAndUrlAuthData authData, - Optional exportInformation) { - if (exportInformation.isPresent()) { - return exportPhotos(authData, Optional.ofNullable(exportInformation.get().getPaginationData())); - } else { - return exportPhotos(authData, Optional.empty()); - } - } - - private ExportResult exportPhotos(TokensAndUrlAuthData authData, - Optional pageData) { - Preconditions.checkNotNull(authData); - MediaResponse response; - try { - response = makeRequest(MEDIA_URL, MediaResponse.class, authData); - } catch (IOException e) { - return new ExportResult<>(e); - } - - List photos = new ArrayList<>(); - - // TODO: check out paging. - for (MediaFeedData photo : response.getData()) { - // TODO json mapping is broken. - String photoId = photo.getId(); - String url = photo.getImages().getStandardResolution().getUrl(); - String text = (photo.getCaption() != null) ? photo.getCaption().getText() : null; - photos.add(new PhotoModel( - "Instagram photo: " + photoId, - url, - text, - null, - photoId, - FAKE_ALBUM_ID, - false)); - } - - List albums = new ArrayList<>(); - - if (!photos.isEmpty() && !pageData.isPresent()) { - albums.add( - new PhotoAlbum( - FAKE_ALBUM_ID, "Imported Instagram Photos", "Photos imported from instagram")); - } - - return new ExportResult<>(ResultType.END, new PhotosContainerResource(albums, photos)); - } - - private T makeRequest(String url, Class clazz, TokensAndUrlAuthData authData) - throws IOException { - HttpRequestFactory requestFactory = httpTransport.createRequestFactory(); - HttpRequest getRequest = - requestFactory.buildGetRequest( - new GenericUrl(url + "?access_token=" + authData.getAccessToken())); - HttpResponse response = getRequest.execute(); - int statusCode = response.getStatusCode(); - if (statusCode != 200) { - throw new IOException( - "Bad status code: " + statusCode + " error: " + response.getStatusMessage()); - } - String result = - CharStreams.toString(new InputStreamReader(response.getContent(), StandardCharsets.UTF_8)); - return objectMapper.readValue(result, clazz); - } -} diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/Caption.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/Caption.java deleted file mode 100644 index 1b9002524..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/Caption.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.datatransferproject.transfer.instagram.photos.model; - -/** DataModel for a Caption object in the Instagram API. Instantiated by JSON mapping. */ -public final class Caption { - - private String created_time; - - private String id; - - private String text; - - public String getCreated_time() { - return created_time; - } - - public String getId() { - return id; - } - - public String getText() { - return text; - } -} - diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/ImageData.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/ImageData.java deleted file mode 100644 index 7b1f84e97..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/ImageData.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.datatransferproject.transfer.instagram.photos.model; - -/** DataModel for a single image object in the Instagram API. Instantiated by JSON mapping. */ -public final class ImageData { - - private String url; - - private int height; - - private int width; - - public String getUrl() { - return url; - } - - public int getHeight() { - return height; - } - - public int getWidth() { - return width; - } -} diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/ImageObject.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/ImageObject.java deleted file mode 100644 index d0ef4f4f9..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/ImageObject.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.datatransferproject.transfer.instagram.photos.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * DataModel for a image in the Instagram API, contains references to multiple resolutions. - * Instantiated by JSON mapping. - */ -public final class ImageObject { - - private ImageData thumbnail; - - @JsonProperty("standard_resolution") - private ImageData standard_resolution; - - @JsonProperty("low_resolution") - private ImageData low_resolution; - - public ImageData getThumbnail() { - return thumbnail; - } - - public ImageData getStandardResolution() { - return standard_resolution; - } - - public ImageData getLowResolution() { - return low_resolution; - } -} diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/MediaFeedData.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/MediaFeedData.java deleted file mode 100644 index 6f3f2f153..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/MediaFeedData.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.datatransferproject.transfer.instagram.photos.model; - -/** DataModel for a media feed in the Instagram API. Instantiated by JSON mapping. */ -public final class MediaFeedData { - - private String id; - - private String type; - - private String created_time; - - private ImageObject images; - - private Caption caption; - - public String getId() { - return id; - } - - public Caption getCaption() { - return caption; - } - - public ImageObject getImages() { - return images; - } - - public String getCreatedTime() { - return created_time; - } - - public String getType() { - return type; - } -} diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/MediaResponse.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/MediaResponse.java deleted file mode 100644 index e138f00d5..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/MediaResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.datatransferproject.transfer.instagram.photos.model; - -import java.util.List; - -/** DataModel for the result of a media query in the Instagram API. Instantiated by JSON mapping. */ -public final class MediaResponse { - - private Meta meta; - - private List data; - - public Meta getMeta() { - return meta; - } - - public List getData() { - return data; - } -} diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/Meta.java b/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/Meta.java deleted file mode 100644 index a4715d913..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/java/org/datatransferproject/transfer/instagram/photos/model/Meta.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.datatransferproject.transfer.instagram.photos.model; - -/** DataModel for a metadata about a response in the Instagram API. Instantiated by JSON mapping. */ -public final class Meta { - - private int code; - - public int getCode() { - return code; - } -} diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/main/resources/META-INF/services/org.datatransferproject.spi.transfer.extension.TransferExtension b/extensions/data-transfer/portability-data-transfer-instagram/src/main/resources/META-INF/services/org.datatransferproject.spi.transfer.extension.TransferExtension deleted file mode 100644 index 9c41e7d38..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/main/resources/META-INF/services/org.datatransferproject.spi.transfer.extension.TransferExtension +++ /dev/null @@ -1,2 +0,0 @@ -org.datatransferproject.transfer.instagram.InstagramTransferExtension - diff --git a/extensions/data-transfer/portability-data-transfer-instagram/src/test/java/org/datatransferproject/transfer/instagram/photos/InstagramPhotoExporterTest.java b/extensions/data-transfer/portability-data-transfer-instagram/src/test/java/org/datatransferproject/transfer/instagram/photos/InstagramPhotoExporterTest.java deleted file mode 100644 index dc8c80db1..000000000 --- a/extensions/data-transfer/portability-data-transfer-instagram/src/test/java/org/datatransferproject/transfer/instagram/photos/InstagramPhotoExporterTest.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2018 The Data Transfer Project Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.datatransferproject.transfer.instagram.photos; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; - -@ExtendWith(MockitoExtension.class) -public class InstagramPhotoExporterTest { - - @Test - public void exporter() { - // TODO: implement - // new InstagramPhotoExporter().export(null, null); - } -} diff --git a/extensions/data-transfer/portability-data-transfer-rememberthemilk/Readme.md b/extensions/data-transfer/portability-data-transfer-rememberthemilk/Readme.md index 9719dbb9a..cbf73b88e 100644 --- a/extensions/data-transfer/portability-data-transfer-rememberthemilk/Readme.md +++ b/extensions/data-transfer/portability-data-transfer-rememberthemilk/Readme.md @@ -16,6 +16,6 @@ Apply for a key at [www.rememberthemilk.com/services/api/keys.rtm](https://www.r ## Maintained By -The Instagram extension was created by the +The Remember the Milk extension was created by the [DTP maintainers](mailto:portability-maintainers@googlegroups.com) and is not an official product of Remember the Milk. diff --git a/extensions/data-transfer/portability-data-transfer-smugmug/Readme.md b/extensions/data-transfer/portability-data-transfer-smugmug/Readme.md index 04afa4113..05967201c 100644 --- a/extensions/data-transfer/portability-data-transfer-smugmug/Readme.md +++ b/extensions/data-transfer/portability-data-transfer-smugmug/Readme.md @@ -18,6 +18,6 @@ SumgMug uses OAuth 1 for authorization. ## Maintained By -The Instagram extension was created by the +The SumgMug extension was created by the [DTP maintainers](mailto:portability-maintainers@googlegroups.com) and is not an official product of SumgMug. diff --git a/settings.gradle b/settings.gradle index 62ca194e9..7819f888a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -49,9 +49,6 @@ include ':extensions:data-transfer:portability-data-transfer-flickr' // Google include ':extensions:auth:portability-auth-google' include ':extensions:data-transfer:portability-data-transfer-google' -// Instagram -include ':extensions:auth:portability-auth-instagram' -include ':extensions:data-transfer:portability-data-transfer-instagram' // Imgur include ':extensions:auth:portability-auth-imgur' include ':extensions:data-transfer:portability-data-transfer-imgur'