Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorized with 500px and auth0, still getting watermarks. #243

Open
JennHaggerty opened this issue Oct 19, 2017 · 0 comments
Open

Authorized with 500px and auth0, still getting watermarks. #243

JennHaggerty opened this issue Oct 19, 2017 · 0 comments

Comments

@JennHaggerty
Copy link

This is for my personal website and I just want to display the images - not post to or delete from in any way - without the 500px watermark. I've authorized the app with in the developers section of 500px and with auth0 on their dashboard.

Here's my gallery component:


import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'app-portfolio',
  templateUrl: './portfolio.component.html',
  styleUrls: ['./portfolio.component.css']
})
export class PortfolioComponent implements OnInit {
  results: string[];
  constructor(private http: HttpClient) {}

  ngOnInit(): void{
    
    fetch('https://api.500px.com/v1/.......').then(function(response) {
        var contentType = response.headers.get("content-type");
        if(contentType && contentType.includes("application/json")) {
          return response.json();
        }
        throw new TypeError("Oops, we haven't got JSON!");
      })
      .then(function(json) {
        const imageUrls = json.photos.map(photo => photo.image_url);
        const el = document.querySelector('#images');
      
        imageUrls.forEach(src => {
          var DOM_img = document.createElement("img");  
          DOM_img.src = src;
          el.appendChild(DOM_img);
        });
      })
      .catch(function(error) { console.log(error); });
  }

}

Should I use a proxy-config.json for this? Do I need to contact sales again (I emailed them days ago without response) and pay to have it removed even though this isn't a commercial application and I get 5 hits tops per month?

If I need to include anything else please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant