get_url(‘https://myapi.com’, [‘published_at’, ‘author’]) + query_fields = DEFAULT_FIELDS https://myapi.com?fields=url,title,published_at,author,published_at,author https://myapi.com?fields=url,title,published_at,author https://myapi.com?fields=url,title,published_at,author,published_at,author, published_at,author +DEFAULT_FIELDS = [‘url','title'] + +def get_url(path, fields=()): + query_fields = DEFAULT_FIELDS + query_fields.extend(fields) + params = { + 'fields': ','.join(query_fields) + } + url = url_concat(path, params) + return url