Android - Retrofit
https://square.github.io/retrofit/
Retrofit
쓰레드 돌리고 콜백도 해주고 오브젝트도 만들어 준다.
rest template
버전은 낮춰봐야한다. 최신 꺼 쓰지말고
gson 어노테이션
@SerialzedName
JSON으로 serialize 될 때 매칭되는 이름을 명시하는 목적으로 사용되는 field 마킹 어노테이션이다.
@Expose
object 중 해당 값이 null일 경우, json으로 만들 필드를 자동 생략해 준다.
예를들어,
@SerializedName("index_name")
@Expose
private String indexName;
이라고 하면, index_name과 indexName을 서로 매칭시켜 주고, 만약 indexName이 null이라면 생략한다.
출처: https://giyatto.tistory.com/92 [행복은 습관입니다.]
https://codinginflow.com/tutorials/android/retrofit/part-1-simple-get-request
Part 1 - Simple GET Request - Coding in Flow
In this video series we will learn how to use Retrofit, which is a type-safe HTTP client for Android and Java. Retrofit allows easy communication with a web service by abstracting the HTTP API into a Java interface. In part 1 we will set up Retrofit in a n
codinginflow.com
영화
The Official Home of YIFY Movies Torrent Download - YTS
The official YTS YIFY Movies Torrents website. Download free yify movies torrents in 720p, 1080p and 3D quality. The fastest downloads at the smallest size.
yts.mx
endpoint : 최종목적지
host 내 서버까지
yts.mx/api/v2/list_movies.json?sort_by=rating
list_movies.josn?sort_by=rating
확장 프로그램
json viewer다운 받아놔야함
header에 jsessionId를 sharedPreparence에
@QueryMap
문서봐야함
?~ 쿼리파라미터
스프링 서버
이미지 로드 라이브러리 3가지
받았을 때
String인데
1. R에 등록 시켜서 연결 시켜주는 라이브러리쓰거다
=> 피카소 - 이미지나 동영상 원본 거의 그대로
2. 구글 Glide = 일반적인 화질로 퍼포먼스가 좋음.
3. universal 이미지 로드 : 쓰지 마세요...
동영상 업로드 받으면 JVM heap메모리에 우선 저장하는데 heap
메모리의 최대 반밖에 못차지한느데
heap이
파일로 만들어서 저장한 다음에 map reduce해야 한다.